Table of Contents

Class DefaultCommandExecutor

Namespace
DSharpPlus.Commands
Assembly
DSharpPlus.Commands.dll
public class DefaultCommandExecutor : ICommandExecutor
Inheritance
DefaultCommandExecutor
Implements

Fields

commandWrappers

This dictionary contains all of the command wrappers intended to be used for bypassing the overhead of reflection and Task/ValueTask handling.

Methods

ExecuteAsync(CommandContext, CancellationToken)

This method will ensure that the command is executable, execute all context checks, and then execute the command, and invoke the appropriate events.

ExecuteContextChecksAsync(CommandContext)

Executes any context checks tied

ExecuteCoreAsync(CommandContext)

This method will execute the command provided without any safety checks, context checks or event invocation.

ExecuteParameterChecksAsync(CommandContext)
InvokeCommandErroredEventAsync(CommandsExtension, CommandErroredEventArgs)

Invokes the CommandErrored event, which isn't normally exposed to the public API.

InvokeCommandExecutedEventAsync(CommandsExtension, CommandExecutedEventArgs)

Invokes the CommandExecuted event, which isn't normally exposed to the public API.

IsCommandExecutable(CommandContext, out string?)

Ensures the command is executable before attempting to execute it.