Table of Contents

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 CommandContext

The context of the command being executed.

errorMessage string

Any 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.