Method IsCommandExecutable
- Namespace
- DSharpPlus.Commands
- Assembly
- DSharpPlus.Commands.dll
IsCommandExecutable(CommandContext, out string?)
Ensures the command is executable before attempting to execute it.
protected virtual bool IsCommandExecutable(CommandContext context, out string? errorMessage)
Parameters
context
CommandContextThe context of the command being executed.
errorMessage
stringAny error message that occurred during the check.
Returns
- bool
Whether the command can be executed.
Remarks
This does NOT execute any context checks. This only checks if the command is executable based on the number of arguments provided.