PublicSlashCommand
Public slash command.
Constructors
Properties
Whether to allow everyone to use this command by default.
Enables or disables the command in DMs.
Default set of Permissions required to use the command on a guild.
Command description, as displayed on Discord.
Map of group names to slash command groups, if any.
A Localised version of description.
Translation cache, so we don't have to look up translations every time.
Quick access to the command registry.
Permissions required to be able to run this command.
Sentry adapter, for easy access to Sentry functions.
Bot settings object.
List of subcommands, if any.
Translations provider, for retrieving translations.
Functions
Override this to implement your command's calling logic. Check subtypes for examples!
Define a check which must pass for the command to be executed.
Overloaded check function to allow for DSL syntax.
Checks whether the bot has the specified required permissions, throwing if it doesn't.
Quick shortcut for emitting a command event without blocking.
Function for registering a custom ephemeral slash command object, for subcommands.
DSL function for easily registering an ephemeral subcommand, without arguments.
DSL function for easily registering an ephemeral subcommand, with arguments.
DSL function for easily registering an ephemeral subcommand, with a modal form.
Given an InteractionCommand, resolve the correct command or subcommand object.
Given an autocomplete event, resolve the correct command or subcommand object.
Given a command event, resolve the correct command or subcommand object.
If enabled, adds the initial Sentry breadcrumb to the given context.
Create a command group, using the given name.
A general way to handle errors thrown during the course of a command's execution.
Call this to open with a response, omit it to ack instead.
Function for registering a custom public slash command object, for subcommands.
DSL function for easily registering a public subcommand, without arguments.
DSL function for easily registering a public subcommand, with arguments.
DSL function for easily registering a public subcommand, with a modal form.
DSL function for easily registering a public subcommand, with arguments and a modal form.
If your bot requires permissions to be able to execute the command, add them using this function.
This will register a requirement for permissions with Discord.
Override this to implement a way to respond to the user, regardless of whatever happens.
Override this to implement the final calling logic, including creating the command context and running with it.
Override this in order to implement any subclass-specific checks.
Runs standard checks that can be handled in a generic way, without worrying about subclass-specific checks.