Skip to content
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

Apply changes to interaction response types and add a new interaction type #1252

Merged
merged 3 commits into from
Mar 8, 2021

Conversation

arqunis
Copy link
Member

@arqunis arqunis commented Mar 6, 2021

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 and ChannelMessage interaction response types, as they have been deprecated and scheduled for removal on the 9th of April, and renames AcknowledgeWithSource to DeferredChannelMessageWithSource to suit a better purpose.

Furthermore, a new MessageInteraction type and its corresponding interaction field in Message 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.

@arqunis arqunis added enhancement An improvement to Serenity. discord feature Related to Discord's functionality. breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users labels Mar 6, 2021
@arqunis arqunis force-pushed the slash_commands_updates branch from 11be207 to d276e8a Compare March 6, 2021 11:35
@arqunis arqunis force-pushed the slash_commands_updates branch from d276e8a to 0cf8ca0 Compare March 6, 2021 13:08
@HarmoGlace
Copy link
Contributor

Sending embeds on an interaction response doesn't work with this PR (tested with https://github.com/acdenisSK/serenity/?branch=slash_commands_updates#0cf8ca025c2d8b73c2bca27eb11181e9b47b3bf4")

@arqunis arqunis added the fix A solution to an existing bug. label Mar 8, 2021
@arqunis arqunis merged commit eba755c into serenity-rs:current Mar 8, 2021
@arqunis arqunis deleted the slash_commands_updates branch March 8, 2021 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users discord feature Related to Discord's functionality. enhancement An improvement to Serenity. fix A solution to an existing bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants