Basic Context APIs
All application command contexts extend the ApplicationCommandContext type, which provides some basic common APIs.
These APIs are available in the action { } block regardless of interaction type,
so you should familiarise yourself with them!
The ApplicationCommandContext type extends the base CommandContext type, so it inherits the APIs defined there.
For more information on the APIs common to all command contexts,
see the basic command context API page.
All application command contexts also extend one of the interaction context types (TODO), unless you're writing an unsafe command (TODO).
Abstract base type representing everything that all application command contexts have in common.
Generic event object representing the interaction that triggered this command execution.
Usually accessed via a more specific event property in each command's specific context type.
Generic event object representing the current command object.
Usually accessed via a more specific command property in each command's specific context type.
Map representing a data cache shared with the command's registered checks.
Properties
The permissions your bot has in this command execution context - that is, based on the current guild, roles and channel.
This is always null if the command was executed in a DM.
Quick access to your bot's settings.
The channel this command invocation happened in.
The guild this command invocation happened in, or null if it happened in a DM.
The guild member that caused this command invocation, or null if:
- This command invocation happened in a DM.
- This command invocation was caused by a webhook.
The Discord message that caused this command invocation.
The Discord user that caused this command invocation, or null if it was a webhook.