Summary
When using a command parameter of type DiscordRole[] to parse multiple role mentions, only a subset of the mentioned roles is successfully parsed and received by the command method. This behavior appears to be inconsistent, as some role mentions are correctly resolved while others are missing entirely.
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 9.0
Operating System
Windows 11
Reproduction Steps
Steps to Reproduce
- Create a command with the following signature:
[RequirePermissions(DiscordPermission.Administrator)]
[Command("send-role-menu")]
[Description("Sends a role selection menu to the channel.")]
public async Task ExecuteAsync(CommandContext ctx,
[Description("The roles to give as options.")] params DiscordRole[] roles)
{
// Log the roles received
foreach (var role in roles)
{
Console.WriteLine($"Received Role: {role?.Name} (ID: {role?.Id})");
}
}
- Call the command with multiple role mentions, e.g.:
/send-role-menu @Owner @Admin
- Observe the roles received in the roles parameter.
Trace Logs
Exceptions or other error messages
Anything else you'd like to share
No response
Reactions are currently unavailable
Summary
When using a command parameter of type DiscordRole[] to parse multiple role mentions, only a subset of the mentioned roles is successfully parsed and received by the command method. This behavior appears to be inconsistent, as some role mentions are correctly resolved while others are missing entirely.
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 9.0
Operating System
Windows 11
Reproduction Steps
Steps to Reproduce
Trace Logs
Exceptions or other error messages
Anything else you'd like to share
No response