Skip to content

Fix AutocompleteResult.Value having no length limit#3206

Merged
Misha-133 merged 1 commit intodiscord-net:devfrom
HEJOK254:fix/autocompleteresult-value-no-length-limit
Dec 23, 2025
Merged

Fix AutocompleteResult.Value having no length limit#3206
Misha-133 merged 1 commit intodiscord-net:devfrom
HEJOK254:fix/autocompleteresult-value-no-length-limit

Conversation

@HEJOK254
Copy link
Contributor

Description

This PR fixes an issue where AutocompleteResult.Value had no precondition for its length. The Discord API Docs specify a maximum length of 100 for the value. This would cause issues where if the program tried to send an AutocompleteResult with a Value that's longer than 100 characters, it would throw a Discord.Net.HttpException after sending a request to the server, which is not ideal.

Changes

  • Add AtMost Precondition for the AutocompleteResult.Value

Related Issues

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.

[Bug]: AutocompleteResult Value has no length limit

2 participants