Class TextCommandProcessor
- Namespace
- DSharpPlus.Commands.Processors.TextCommands
- Assembly
- DSharpPlus.Commands.dll
public sealed class TextCommandProcessor : BaseCommandProcessor<ITextArgumentConverter, TextConverterContext, TextCommandContext>, ICommandProcessor
- Inheritance
-
TextCommandProcessor
- Implements
- Inherited Members
Constructors
- TextCommandProcessor()
Creates a new instance of TextCommandProcessor with the default configuration.
- TextCommandProcessor(TextCommandConfiguration)
Creates a new instance of TextCommandProcessor with the specified configuration.
Fields
Properties
- Commands
List of commands which are registered to 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
- CreateCommandContext(TextConverterContext, IReadOnlyDictionary<CommandParameter, object?>)
Constructs a command context from the parsed arguments and the current state of the ConverterContext.
- ExecuteConverterAsync<T>(ITextArgumentConverter, TextConverterContext)
Executes an argument converter on the specified context.
- TryGetCommand(string, ulong, out int, out Command?)
Attempts to retrieve a command from the provided command text. Searches for the command by name, then by alias. Subcommands are also resolved. This method ignores DefaultGroupCommandAttribute's and will instead return the group command instead of the default subcommand.