You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed an issue when I wanted to create a command that has a required parameter as well as Option parameter that is optional. Remora will put the optional parameter as a first one (I suspect this is because Remora.Commands just puts Option parameters as first for easier handling) and that creates a problem when registering it as a slash command.
Steps to Reproduce
A command such as this will fail to register
[Command("echo")][Description("Send a message")]publicTask<Result>HandleEchoAsync(stringmessage,[Option('c',"channel")]Snowflake?channel=null);
Expected Behavior
Registers the slash command correctly.
Current Behavior
Puts the Option as first parameter and results in APPLICATION_COMMAND_OPTIONS_REQUIRED_INVALID Required options must be placed before non-required options error.
Description
I've noticed an issue when I wanted to create a command that has a required parameter as well as
Option
parameter that is optional. Remora will put the optional parameter as a first one (I suspect this is because Remora.Commands just putsOption
parameters as first for easier handling) and that creates a problem when registering it as a slash command.Steps to Reproduce
A command such as this will fail to register
Expected Behavior
Registers the slash command correctly.
Current Behavior
Puts the Option as first parameter and results in
APPLICATION_COMMAND_OPTIONS_REQUIRED_INVALID Required options must be placed before non-required options
error.Library / Runtime Information
Remora.Command v10.0.1, Remora.Discord.Commands v25.1.0
.NET 6
The text was updated successfully, but these errors were encountered: