Skip to content

fix(interactions): use previous flags value when editing messages - #1582

Merged
shiftinv merged 6 commits into
masterfrom
fix/interaction-flags-attachment-editing
Aug 2, 2026
Merged

fix(interactions): use previous flags value when editing messages#1582
shiftinv merged 6 commits into
masterfrom
fix/interaction-flags-attachment-editing

Conversation

@shiftinv

Copy link
Copy Markdown
Member

Summary

Retains sent interaction response messages and uses that message's flags as the baseline when later editing the message using InteractionResponse.edit_original_response. I would assume it's fairly rare to hit any issues with the current code, but something like this previously did not work:

await inter.send(components=disnake.ui.TextDisplay("hii"))
await inter.edit_original_response(suppress_embeds=True)

Setting suppress_embeds would edit the message with flags: 128, which fails as the cv2 flag (32768) cannot be unset.
As an added bonus, the code no longer has to fetch .original_response() when adding new files in an edit.-

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running uv run nox -s lint
    • I have type-checked the code by running uv run nox -s pyright
  • This PR fixes an issue
  • This PR adds something new (e.g. new method or parameters)
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@shiftinv shiftinv added this to the disnake v2.13 milestone Jul 27, 2026
@shiftinv shiftinv added this to disnake Jul 27, 2026
@github-project-automation github-project-automation Bot moved this to Todo in disnake Jul 27, 2026
@read-the-docs-community

read-the-docs-community Bot commented Jul 27, 2026

Copy link
Copy Markdown

Documentation build overview

📚 disnake | 🛠️ Build #33875032 | 📁 Comparing 5069ef2 against latest (03ae67c)

  🔍 Preview build  

48 files changed · ± 48 modified

± Modified

@shiftinv
shiftinv merged commit a5d860a into master Aug 2, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in disnake Aug 2, 2026
@shiftinv
shiftinv deleted the fix/interaction-flags-attachment-editing branch August 2, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant