Skip to content

Fix overflow exception#3142

Merged
Misha-133 merged 2 commits into
discord-net:devfrom
OverwrittenCode:Fix-Overflow-Exception
Jun 7, 2025
Merged

Fix overflow exception#3142
Misha-133 merged 2 commits into
discord-net:devfrom
OverwrittenCode:Fix-Overflow-Exception

Conversation

@OverwrittenCode

Copy link
Copy Markdown
Contributor

Description

This PR validates the arguments parsed into MinValueAttribute and MaxValueAttribute when building a SlashCommandParameter.
It ensures that it is within the supported range of the type itself and within the supported range set by Discord.

Changes

  • fix: validate min/max value against OverflowException

Related Issues

N/A

@Misha-133 Misha-133 merged commit 0c1536d into discord-net:dev Jun 7, 2025
2 checks passed
OverwrittenCode added a commit to OverwrittenCode/Discord.Net that referenced this pull request Jun 7, 2025
Misha-133 pushed a commit that referenced this pull request Jun 11, 2025
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