Skip to content

✨feat: unify ephemeral dialog responses with in perms files#2327

Merged
mkmccarty merged 1 commit intomainfrom
mm-branch-1
Apr 5, 2026
Merged

✨feat: unify ephemeral dialog responses with in perms files#2327
mkmccarty merged 1 commit intomainfrom
mm-branch-1

Conversation

@mkmccarty
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 5, 2026 18:29
@mkmccarty mkmccarty merged commit d04c554 into main Apr 5, 2026
12 checks passed
@mkmccarty mkmccarty deleted the mm-branch-1 branch April 5, 2026 18:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the boost permission dialog button handlers to respond by updating (and effectively closing) the original ephemeral dialog message, instead of sending a new ephemeral message response.

Changes:

  • Introduced a small respondAndClose helper in each permission handler to standardize interaction responses.
  • Switched button interaction responses from InteractionResponseChannelMessageWithSource to InteractionResponseUpdateMessage, while clearing components to disable the dialog buttons.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/boost/leaderboard_permission.go Unifies leaderboard permission button responses by updating the existing ephemeral dialog message and removing components.
src/boost/coop_status_permission.go Unifies coop status permission button responses similarly, updating the existing dialog message and clearing components.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Type: discordgo.InteractionResponseUpdateMessage,
Data: &discordgo.InteractionResponseData{
Content: content,
Flags: discordgo.MessageFlagsEphemeral,
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InteractionResponseUpdateMessage responses generally cannot set Flags (ephemeral is only meaningful on the initial message creation). Including Flags: MessageFlagsEphemeral here may be ignored or can cause Discord to reject the interaction with an "Invalid Form Body" error. Suggestion: remove Flags from the update response data (the message will remain ephemeral since the original dialog message was ephemeral), and only clear Components + update Content.

Suggested change
Flags: discordgo.MessageFlagsEphemeral,

Copilot uses AI. Check for mistakes.
Type: discordgo.InteractionResponseUpdateMessage,
Data: &discordgo.InteractionResponseData{
Content: content,
Flags: discordgo.MessageFlagsEphemeral,
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above: InteractionResponseUpdateMessage updates should not include Flags. Setting MessageFlagsEphemeral in an update callback can be rejected by Discord or silently ignored. Suggestion: omit Flags from the update response, while still setting Content and clearing Components.

Suggested change
Flags: discordgo.MessageFlagsEphemeral,

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants