Class SlashCommandProcessor
- Namespace
- DSharpPlus.Commands.Processors.SlashCommands
- Assembly
- DSharpPlus.Commands.dll
public sealed class SlashCommandProcessor : BaseCommandProcessor<InteractionCreatedEventArgs, ISlashArgumentConverter, InteractionConverterContext, SlashCommandContext>, ICommandProcessor<InteractionCreatedEventArgs>, ICommandProcessor
- Inheritance
-
BaseCommandProcessor<InteractionCreatedEventArgs, ISlashArgumentConverter, InteractionConverterContext, SlashCommandContext>SlashCommandProcessor
- Implements
- Inherited Members
Constructors
- SlashCommandProcessor()
Creates a new instance of SlashCommandProcessor.
- SlashCommandProcessor(SlashCommandConfiguration)
Creates a new instance of SlashCommandProcessor.
Fields
Properties
- Commands
List of commands which are registered to this processor
- Configuration
The configuration values being used for this processor.
Methods
- ConfigureAsync(CommandsExtension)
This method is called on initial setup and when the extension is refreshed. Register your needed event handlers here but use a mechanism to track if the inital setup was already done and if this call is only a refresh
- ExecuteConverterAsync<T>(ISlashArgumentConverter, InteractionConverterContext, InteractionCreatedEventArgs)
Executes an argument converter on the specified context.
- MapApplicationCommands(IReadOnlyList<DiscordApplicationCommand>)
Matches the application commands to the commands in the command tree.
- ParseArgumentsAsync(InteractionConverterContext, InteractionCreatedEventArgs)
Parses the arguments provided to the command and returns a prepared command context.
- RegisterSlashCommandsAsync(CommandsExtension)
Registers Commands as application commands. This will registers regardless of RegisterCommands's value.
- ToApplicationCommandAsync(Command)
Only use this for commands of type SlashCommand. It will cut out every subcommands which are considered to be not a SlashCommand