A builder that creates API-compatible JSON data for context menu commands.
Readonly
The set of permissions represented as a bit set for the command.
Use setDefaultMemberPermissions or setDMPermission instead.
Deprecated
Indicates whether the command is available in direct messages with the application.
Remarks
By default, commands are visible. This property is only for global commands.Readonly
The name localizations of this command.
Readonly
The type of this command.
Sets the default permissions a member should have in order to run this command.
Remarks
You can set this to'0'
to disable the command by default.Name | Type | Optional | Description |
---|---|---|---|
permissions | Permissions_2 | bigint | number | null | undefined | No | The permissions bit field to set |
Use setDefaultMemberPermissions or setDMPermission instead.
Deprecated
Remarks
If set tofalse
, you will have to later PUT
the permissions for this command.Name | Type | Optional | Description |
---|---|---|---|
value | boolean | No | Whether to enable this command by default |
Sets if the command is available in direct messages with the application.
Remarks
By default, commands are visible. This method is only for global commands.Name | Type | Optional | Description |
---|---|---|---|
enabled | boolean | null | undefined | No | Whether the command should be enabled in direct messages |
Sets the name of this command.
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The name to use |
Sets a name localization for this command.
Name | Type | Optional | Description |
---|---|---|---|
locale | LocaleString | No | The locale to set |
localizedName | string | null | No | The localized name for the given locale |
Sets the name localizations for this command.
Name | Type | Optional | Description |
---|---|---|---|
localizedNames | LocalizationMap | null | No | The object of localized names to set |
Sets the type of this command.
Name | Type | Optional | Description |
---|---|---|---|
type | ContextMenuCommandType | No | The type to use |
Serializes this builder to API-compatible JSON data.