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

Fix an issue with incorrect parsing of application command attachment parameters by Naamloos · Pull Request #2472 · DSharpPlus/DSharpPlus · GitHub

Fix an issue with incorrect parsing of application command attachment parameters - #2472

Merged
akiraveliara merged 1 commit into
masterfrom
bugfix/2450-second-discordattachment-parameter-fails-to-parse-on-subcommands-argumentparseexception
Sep 15, 2026
Merged

akiraveliara merged 1 commit into
masterfrom
bugfix/2450-second-discordattachment-parameter-fails-to-parse-on-subcommands-argumentparseexception

Conversation

Copy link
Copy Markdown
Member

Make sure you familiarize yourself with our contributing guidelines. (delete this line afterwards)

  • 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 #2450

Details

Discord only gives us a single "attachments" option when we receive an interaction. The commands extension would check the index of the method parameter against the amount of parameters in total, which would always be 1. Any time more than 1 argument is of type DiscordAttachment, anything past the first argument would fail to parse because of this.

I'd argue the checks are way too strict anyway, since Discord guarantees a lot of stuff we check for.
but at the end of the day, it's still Discord.

Changes proposed

  • Modify the checks in such a way that they do not deny valid payloads.

Notes

sup im back

  • All features in this pull request were tested.

akiraveliara added bugfix commands For issues related to DSharpPlus.Commands labels Sep 15, 2026
akiraveliara added this to the v5.0 milestone Sep 15, 2026
akiraveliara merged commit 8fb4fc0 into master Sep 15, 2026
1 check passed
akiraveliara deleted the bugfix/2450-second-discordattachment-parameter-fails-to-parse-on-subcommands-argumentparseexception branch September 15, 2026 21:25
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

bugfix commands For issues related to DSharpPlus.Commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Second DiscordAttachment parameter fails to parse on subcommands (ArgumentParseException)

2 participants


Back | FazBrowse Home | New Git URL