-
Notifications
You must be signed in to change notification settings - Fork 3
✨feat: unify ephemeral dialog responses with in perms files #2327
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -88,6 +88,19 @@ func ShowLeaderboardPermissionDialog(s *discordgo.Session, i *discordgo.Interact | |||
| func HandleLeaderboardPermissionButton(s *discordgo.Session, i *discordgo.InteractionCreate) { | ||||
| userID := bottools.GetInteractionUserID(i) | ||||
| customID := i.MessageComponentData().CustomID | ||||
| respondAndClose := func(content string) { | ||||
| err := s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{ | ||||
| Type: discordgo.InteractionResponseUpdateMessage, | ||||
| Data: &discordgo.InteractionResponseData{ | ||||
| Content: content, | ||||
| Flags: discordgo.MessageFlagsEphemeral, | ||||
|
||||
| Flags: discordgo.MessageFlagsEphemeral, |
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.
Same issue as above:
InteractionResponseUpdateMessageupdates should not includeFlags. SettingMessageFlagsEphemeralin an update callback can be rejected by Discord or silently ignored. Suggestion: omitFlagsfrom the update response, while still settingContentand clearingComponents.