Method ExecuteAsync
- Namespace
- DSharpPlus.Commands
- Assembly
- DSharpPlus.Commands.dll
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.
public virtual ValueTask ExecuteAsync(CommandContext context, CancellationToken cancellationToken = default)
Parameters
contextCommandContextThe context of the command being executed.
cancellationTokenCancellationTokenThe cancellation token to cancel the command execution.
Returns
Remarks
If any exceptions caused by the command were to occur, they will be delegated to the CommandErrored event.