-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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 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")]
public Task<Result> HandleEchoAsync
(
string message,
[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.
Library / Runtime Information
Remora.Command v10.0.1, Remora.Discord.Commands v25.1.0
.NET 6
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working