Abstract
Optional
options: CommandOptionsReadonly
applicationThe application command registry associated with this command.
Optional
chatOptional
contextA basic summary about the command
Longer version of command's summary and how to use it
Whether or not the piece is enabled.
Readonly
fullThe full category for the command, can be overridden by setting the Command.Options.fullCategory option.
If Command.Options.fullCategory is not set, then:
commands/General/Information/info.ts
then
this property will be ['General', 'Info']
.[]
.Readonly
locationThe location metadata for the piece's file.
Readonly
nameThe name of the piece.
Readonly
optionsThe raw options passed to this Piece
The preconditions to be run.
The raw name of the command as provided through file name or constructor options.
This is exactly what is set by the developer, completely unmodified internally by the framework.
Unlike the name
which gets lowercased for storing it uniquely in the CommandStore.
Readonly
storeThe store that contains the piece.
The strategy to use for the lexer.
If SapphireClient.typing is true, it can be overridden for a specific command using this property, set via its options. Otherwise, this property will be ignored.
The main category for the command, if any.
This getter retrieves the first value of Command.fullCategory, if it has at least one item, otherwise it
returns null
.
A reference to the Container object for ease of use.
The parent category for the command.
This getter retrieves the last value of Command.fullCategory, if it has at least one item, otherwise it
returns null
.
The sub-category for the command, if any.
This getter retrieves the second value of Command.fullCategory, if it has at least two items, otherwise
it returns null
.
Optional
autocompleteExecutes the autocomplete logic.
:::tip
You may use this, or alternatively create an InteractionHandler interaction handler to handle autocomplete interactions. Keep in mind that commands take precedence over interaction handlers.
:::
The interaction that triggered the autocomplete.
Executes the application command's logic.
The interaction that triggered the command.
Executes the context menu's logic.
The interaction that triggered the command.
Abstract
contextThe message pre-parse method. This method can be overridden by plugins to define their own argument parser.
The message that triggered the command.
The raw parameters as a single string.
The command-context used in this execution.
Executes the message command's logic.
The message that triggered the command.
The value returned by Command.messagePreParse, by default an instance of Args.
Protected
parseParses the command's options and processes them, calling Command#parseConstructorPreConditionsRunIn, Command#parseConstructorPreConditionsNsfw, Command#parseConstructorPreConditionsRequiredClientPermissions, and Command#parseConstructorPreConditionsCooldown.
The command options given from the constructor.
Protected
parseProtected
parseProtected
parseProtected
parseProtected
parseOptional
registerProtected
resolveStatic
run
The aliases for the piece.