Apply changes to interaction response types and add a new interaction type #1252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This updates the interaction types to reflect the changes as laid in the slash commands UI changes pull request for Discord's API documentation: discord/discord-api-docs#2615.
This removes the
Acknowledge
andChannelMessage
interaction response types, as they have been deprecated and scheduled for removal on the 9th of April, and renamesAcknowledgeWithSource
toDeferredChannelMessageWithSource
to suit a better purpose.Furthermore, a new
MessageInteraction
type and its correspondinginteraction
field inMessage
is added.Additionally, a fix is incorporated to the interaction responses builders to use the correct field name for embeds (
embed
->embeds
).Type of Change
This is a breaking change that enhances the API to be up-to-date with Discord's API. However, as slash commands are locked behind a feature flag that states that they're an unstable feature, the breaking change can be excused and put on the
current
branch.How Has This Been Tested?
This hasn't been tested yet, but according to the new documentation, it should work as intended.