AbstractOptionaloptions: CommandOptionsReadonlyapplicationThe application command registry associated with this command.
OptionalchatOptionalcontextA basic summary about the command
Longer version of command's summary and how to use it
Whether or not the piece is enabled.
ReadonlyfullThe 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'].[].ReadonlylocationThe location metadata for the piece's file.
ReadonlynameThe name of the piece.
ReadonlyoptionsThe 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.
ReadonlystoreThe 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.
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.
OptionalautocompleteExecutes 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.
AbstractcontextThe 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.
Per-piece listener that is called when the piece is loaded into the store. Useful to set-up asynchronous initialization tasks.
Per-piece listener that is called when the piece is unloaded from the store. Useful to set-up clean-up tasks.
ProtectedparseParses the command's options and processes them, calling Command#parseConstructorPreConditionsRunIn, Command#parseConstructorPreConditionsNsfw, Command#parseConstructorPreConditionsRequiredClientPermissions, and Command#parseConstructorPreConditionsCooldown.
The command options given from the constructor.
ProtectedparseAppends the Cooldown precondition when Command.Options.cooldownLimit and
Command.Options.cooldownDelay are both non-zero.
The command options given from the constructor.
ProtectedparseAppends the NSFW precondition if Command.Options.nsfw is set to true.
The command options given from the constructor.
ProtectedparseAppends the ClientPermissions precondition when Command.Options.requiredClientPermissions resolves to a
non-zero bitfield.
The command options given from the constructor.
ProtectedparseAppends the UserPermissions precondition when Command.Options.requiredUserPermissions resolves to a
non-zero bitfield.
The command options given from the constructor.
ProtectedparseAppends the RunIn precondition based on the values passed, defaulting to null, which doesn't add a
precondition.
The command options given from the constructor.
OptionalregisterRegisters the application commands that should be handled by this command.
This command's registry
Reloads the piece by loading the same path in the store.
ProtectedresolveResolves the Command.Options.runIn option into a Command.RunInTypes array.
The types to resolve.
The resolved types, or null if no types were resolved.
Type-guard that ensures the command supports handling autocomplete interactions by checking if the handler for it is present
Type-guard that ensures the command supports chat input commands by checking if the handler for it is present
Type-guard that ensures the command supports context menu commands by checking if the handler for it is present
Type-guard that ensures the command supports message commands by checking if the handler for it is present
Defines the JSON.stringify behavior of the command.
Unloads and disables the piece.
Staticrun
The aliases for the piece.