FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix embed suppression/unsuppression in ModifyEmbedSuppressionAsync by FloatingMilkshake · Pull Request #2467 · DSharpPlus/DSharpPlus · GitHub

Fix embed suppression/unsuppression in ModifyEmbedSuppressionAsync - #2467

Merged
akiraveliara merged 1 commit into
DSharpPlus:masterfrom
FloatingMilkshake:fix-embed-suppression
Sep 1, 2026
Merged

akiraveliara merged 1 commit into
DSharpPlus:masterfrom
FloatingMilkshake:fix-embed-suppression

Conversation

Copy link
Copy Markdown
Contributor
  • This pull request was written by AI
  • This pull request was assisted by AI, but you wrote the final code
  • This pull request did not involve AI in any way

Summary

Fixes #2449. Fixes unsuppressing embeds with DiscordMessage.ModifyEmbedSuppressionAsync, and tweaks suppressing.

Details

Changes ModifyEmbedSuppressionAsync to account for the message's current flags when modifying them. Previously D#+ would have always sent {"flags":4} when suppressing, and {} (which did nothing*) when unsuppressing. Now it will send the current flags in addition to (or without) SUPPRESS_EMBEDS. For example, when suppressing a message with the HAS_SNAPSHOT flag, D#+ will send {"flags":16388}: HAS_SNAPSHOT (16384) + SUPPRESS_EMBEDS (4). When unsuppressing the same message, it will send {"flags":16384}.

*but sometimes it would cause a BadRequestException to be thrown anyway (like when used on a message with IS_COMPONENTS_V2 set), and that no longer happens with this change, so that's also a plus. Discord will ignore SUPPRESS_EMBEDS when it's invalid (like on a CV2 message) instead of sending back Bad Request

  • All features in this pull request were tested.

akiraveliara merged commit d23f8e1 into DSharpPlus:master Sep 1, 2026
1 check passed
FloatingMilkshake deleted the fix-embed-suppression branch September 1, 2026 01:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

DiscordMessage.ModifyEmbedSuppressionAsync is unable to unsuppress embeds

2 participants


Back | FazBrowse Home | New Git URL