-
-
Notifications
You must be signed in to change notification settings - Fork 319
Closed
Labels
Milestone
Description
Summary
When using the IInteractionLocalizer and setting a name or description which is above the max allowed number of characters, the command registering fails and a BadRequestException is triggered. This happens on the command descriptions and the parameters.
What version of the library are you using?
v5.0.0-nightly (make sure you are using the latest nightly!)
What .NET version are you using? Make sure to use the latest patch release for your major version.
.NET 8.0
Operating System
Windows 11 23H2 - Build 22635.4005
Reproduction Steps
- Create a SlashCommand
- Apply the Description Attribute
- Enter a text with 101 characters
- Do the same for an argument
- Run the bot
Trace Logs
No response
Exceptions or other error messages
DSharpPlus.BaseDiscordClient[112] Request to https://discord.com/api/v10/applications/xxx/guilds/xxx/commands triggered an exceptionDSharpPlus.Exceptions.BadRequestException: Bad request: BadRequest
at DSharpPlus.Net.RestClient.ExecuteRequestAsync[TRequest](TRequest request)
DSharpPlus.BaseDiscordClient[104] Event handler exception for event GUILD_DOWNLOAD_COMPLETED thrown from System.Threading.Tasks.Task <ConfigureAsync>b__0(DSharpPlus.DiscordClient, DSharpPlus.EventArgs.GuildDownloadCompletedEventArgs) (defined in DSharpPlus.Commands.Processors.SlashCommands.SlashCommandProcessor+<>c__DisplayClass12_0)DSharpPlus.Exceptions.BadRequestException: Bad request: BadRequest
at DSharpPlus.Net.RestClient.ExecuteRequestAsync[TRequest](TRequest request)
at DSharpPlus.Net.DiscordApiClient.BulkOverwriteGuildApplicationCommandsAsync(UInt64 applicationId, UInt64 guildId, IEnumerable`1 commands)
at DSharpPlus.DiscordClient.BulkOverwriteGuildApplicationCommandsAsync(UInt64 guildId, IEnumerable`1 commands)
at DSharpPlus.Commands.Processors.SlashCommands.SlashCommandProcessor.RegisterSlashCommandsAsync(CommandsExtension extension)
at DSharpPlus.Commands.Processors.SlashCommands.SlashCommandProcessor.<>c__DisplayClass12_0.<<ConfigureAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at DSharpPlus.AsyncEvents.AsyncEvent`2.<>c__DisplayClass7_0.<<InvokeAsync>b__0>d.MoveNext()Anything else you'd like to share
No response
Reactions are currently unavailable