-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Acknowledge function to ApplicationCommandInteractionCreate for HTTP server interactions #409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good addition. Can you also add the Acknowledge
method to the other interaction events?
All requested changes have been added. Autocomplete does not as it does not have a Interaction Callback Type and you are expected to respond via the http response on the original request. |
A few issues fixed: Auto complete does have an interaction type: Moved |
thanks |
This pull request introduces a new function to
ApplicationCommandInteractionCreate
ApplicationCommandInteractionCreate.Acknowledge()
Additions:
New Interaction Response Type:
InteractionResponseTypeAcknowledge
. A Strictly internal iota to identify this response type.New function:
ApplicationCommandInteractionCreate.Acknowledge()
. This method is used to respond to the original HTTP request from discord with StatusAccepted (202).This is not like
ApplicationCommandInteractionCreate.DeferCreateMessage()
. You are still required to respond with a new HTTP request within 3 seconds to respond to the interaction.Unlike
ApplicationCommandInteractionCreate.CreateMessage()
, you are able to access the response which will contain error or the sent message when you sendevent.Client().Rest().CreateInteractionResponse()
Source to this can be found here
If you send this request for an interaction received over HTTP, respond to the original HTTP request with a 202 and no body.
This is the preferred way to respond to Interactions as you can receive the message created in the response if u need it and errors.