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
This issue was reported before, could not be reproduced and closed, and given that it is poorly worded and with some testing i found it goes a bit more deeper than original issue post. In short new report, and it's still a thing.
Og report: #1795
The Issue. If you have multiple optional parameters, example public async Task ExecuteAsync(CommandContext, string a ="", string b = "") and you leave the first option blank, it moves the second one as the first one.
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
win11
Reproduction Steps
Have these commands. These commands are created with AddCommands(assembly)
public async Task ExecuteAsync(CommandContext ctx, string option1 = "", string option2 = "")
{
await ctx.RespondAsync($"This is string 1: `{option1}`\nThis is string 2: {option2}");
}
[Command("testOptionalMix")]
public async Task ExecuteAsync(CommandContext ctx, int option1 = 0, string option2 = "")
{
await ctx.RespondAsync($"This is string 1: `{option1}`\nThis is string 2: {option2}");
}
Calling testOptional in discord slash commands with option1 blank and option2 with "test" will actually set option1 as "test"
Calling testOptionalMix in discord slash commands with option1 blank and option2 with "test" will result a Failed to parse argument 'option1'
Here is a demonstration gif:
This is on the latest nightly(02204).
Trace Logs
No response
Exceptions or other error messages
No response
Anything else you'd like to share
No response
The text was updated successfully, but these errors were encountered:
Summary
This issue was reported before, could not be reproduced and closed, and given that it is poorly worded and with some testing i found it goes a bit more deeper than original issue post. In short new report, and it's still a thing.
Og report: #1795
The Issue. If you have multiple optional parameters, example
public async Task ExecuteAsync(CommandContext, string a ="", string b = "")
and you leave the first option blank, it moves the second one as the first one.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
win11
Reproduction Steps
Have these commands. These commands are created with
AddCommands(assembly)
Calling
testOptional
in discord slash commands withoption1
blank andoption2
with "test" will actually set option1 as "test"Calling
testOptionalMix
in discord slash commands withoption1
blank andoption2
with "test" will result aFailed to parse argument 'option1'
Here is a demonstration gif:
This is on the latest nightly(02204).
Trace Logs
No response
Exceptions or other error messages
No response
Anything else you'd like to share
No response
The text was updated successfully, but these errors were encountered: