#Getting slash command arguments in SlashCommandExecuted

1 messages · Page 1 of 1 (latest)

winged inlet
#

The command name can be found in SlashCommandInfo.Name, but what about the arguments?
For example the user inputs a command like this /say My name
How do i get "My name", or any other command argument?

private Task SlashCommandExecuted(SlashCommandInfo arg1, IInteractionContext arg2, IResult arg3)
{
    // get command name and arguments
}

Thanks!

tropic crow
#

I would guess like this

((ISlashCommandInteraction)arg2.Interaction).Data.Options
white oak
#

arg1.Parameters