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
Nullable slash command arguments in DSharpPlus.Commands fire DiscordClient.CommandErrored event under certain conditions with "DSharpPlus.Commands.Exceptions.ArgumentParseException: Argument Converter for type DSharpPlus.Entities.DiscordChannel was unable to parse the argument."
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
Ubuntu 22.04
Reproduction Steps
Using the below as an example, specify gameserver and the optional prefix and suffix arguments, but do not specify voice-channel.
[Command("onlinechannel")][Description("Assign a voice channel to display the number online")][RequirePermissions(botPermissions: DiscordPermissions.None, userPermissions: DiscordPermissions.ManageGuild)]publicasync Task SetOnlineChannel(SlashCommandContextctx,[Parameter("gameserver")][Description("Choose the gameserver to modify")][SlashAutoCompleteProvider<GameserverAutocompleteHandler>]intgameserverId,[Parameter("voice-channel")][Description("Choose the voice channel to rename with the player count")][SlashChannelTypes(DiscordChannelType.Voice)]DiscordChannel?voiceChannel=null,[Parameter("prefix")][Description("The text to display before the number of players in the voice channel name")]string?prefix=null,[Parameter("suffix")][Description("The text to display after the number of players in the voice channel name")]string?suffix=null)
Trace Logs
[17:57:55 VRB] Discord CommandErrored: Message: Argument Converter for type DSharpPlus.Entities.DiscordChannel was unable to parse the argument. : StackTrace: null
Exceptions or other error messages
17:57:55 WRN] Discord CommandErrored
DSharpPlus.Commands.Exceptions.ArgumentParseException: Argument Converter for type DSharpPlus.Entities.DiscordChannel was unable to parse the argument.
Anything else you'd like to share
No response
The text was updated successfully, but these errors were encountered:
Summary
Nullable slash command arguments in
DSharpPlus.Commands
fireDiscordClient.CommandErrored
event under certain conditions with "DSharpPlus.Commands.Exceptions.ArgumentParseException: Argument Converter for type DSharpPlus.Entities.DiscordChannel was unable to parse the argument."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
Ubuntu 22.04
Reproduction Steps
Using the below as an example, specify
gameserver
and the optionalprefix
andsuffix
arguments, but do not specifyvoice-channel
.Trace Logs
Exceptions or other error messages
Anything else you'd like to share
No response
The text was updated successfully, but these errors were encountered: