Creates a new CommandPayload
instance.
Optional
data: { Optional initial data to set in the payload.
Optional
default_Optional
default_Optional
description?: stringOptional
description_Optional
name_Optional
nsfw?: booleanOptional
options?: any[]Optional
type?: numberGets the default member permissions for the command.
A string representing the default member permissions as a bit set.
Sets the default member permissions for the command. The permissions are represented as a bitwise string.
A string representing the default permissions as a bit set.
Gets whether the command is enabled by default.
True if the command is enabled by default, false otherwise.
Sets whether the command is enabled by default.
True if the command should be enabled by default, false otherwise.
Gets the description of the command.
The description of the command.
Sets the description of the command.
The description must be between 1 and 100 characters for CHAT_INPUT
commands.
The description of the command.
Gets the localization dictionary for the command's description.
A dictionary of localized descriptions with locale keys.
Sets the localization dictionary for the command's description.
A dictionary with locale keys and localized description strings.
Gets the name of the command.
The name of the command.
Sets the name of the command. The name must be between 1 and 32 characters.
The name of the command.
Gets the localization dictionary for the command's name.
A dictionary of localized names with locale keys.
Sets the localization dictionary for the command's name.
A dictionary with locale keys and localized name strings.
Gets whether the command is age-restricted (NSFW).
True if the command is NSFW, false otherwise.
Sets whether the command is age-restricted (NSFW).
True if the command should be marked as NSFW, false otherwise.
Gets the options for the command.
An array of command options.
Sets the options for the command. Options are the parameters for the command, and the maximum number allowed is 25.
An array of command options.
Gets the type of the command.
The type of the command.
Sets the type of the command.
The type determines whether the command is a CHAT_INPUT
, USER
, or MESSAGE
command.
The command type as a number.
Represents the payload for creating or updating a Discord application command. This class encapsulates all the parameters needed to define a command and provides necessary validation for the fields.