Basic Context APIs
All command contexts extend the CommandContext type, which provides some basic common APIs.
These APIs are available in the action { } block regardless of command type,
so you should familiarise yourself with them!
Abstract base type representing an execution context common to all commands.
Object representing the currently executing command.
Command context implementations tend to have a property with a more specific type than this.
The event that triggered this command execution.
Command context implementations tend to have a property with a more specific type than this.
Translation key representing the command's name, as provided by the user and then lower-cased.
As some command types support aliases, this generally doesn't match command.name.
When working with chat commands, consider using commandName.key to represent the
command name in your responses.
Data cache shared with the command's defined checks.
Functions
Show/Hide Internal APIs
Retrieve the relevant channel for this command execution.
You should generally use the context's corresponding property instead, as this function doesn't do any caching.
Retrieve the relevant guild for this command execution, if any.
You should generally use the context's corresponding property instead, as this function doesn't do any caching.
Retrieve the relevant guild member for this command execution, if any.
You should generally use the context's corresponding property instead, as this function doesn't do any caching.
Retrieve the relevant user for this command execution, if any.
You should generally use the context's corresponding property instead, as this function doesn't do any caching.
Populate any relevant data required by a specific command context subtype.
Properties
Data cache shared with the command's defined checks.
Object representing the currently executing command.
Command context implementations tend to have a property with a more specific type than this.
Translation key representing the command's name, as provided by the user and then lower-cased.
As some command types support aliases, this generally doesn't match command.name.
When working with chat commands, consider using commandName.key to represent the command
name in your responses.
The event that triggered this command execution.
Command context implementations tend to have a property with a more specific type than this.
Quick access to your bot's Sentry adapter (TODO).