ContextMenuCommandBuilder
No summary provided.
Readonly
Set of permissions represented as a bit set for the command
This property is deprecated and will be removed in the future. You should use setDefaultMemberPermissions or setDMPermission instead.
Deprecated
Indicates whether the command is available in DMs with the application, only for globally-scoped commands. By default, commands are visible.
Readonly
The localized names for this command
Readonly
The type of this context menu command
Sets the default permissions a member should have in order to run the command.
Remarks
You can set this to'0'
to disable the command by default.See Also
https://discord.com/developers/docs/interactions/application-commands#permissionsName | Type | Optional | Description |
---|---|---|---|
permissions | Permissions | 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.See Also
https://discord.com/developers/docs/interactions/application-commands#permissionsName | Type | Optional | Description |
---|---|---|---|
value | boolean | No | Whether or not to enable this command by default |
Sets if the command is available in DMs with the application, only for globally-scoped commands. By default, commands are visible.
See Also
https://discord.com/developers/docs/interactions/application-commands#permissionsName | Type | Optional | Description |
---|---|---|---|
enabled | boolean | null | undefined | No | If the command should be enabled in DMs |
Sets the name
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The name |
Sets a name localization
Name | Type | Optional | Description |
---|---|---|---|
locale | LocaleString | No | The locale to set a description for |
localizedName | string | null | No | The localized description for the given locale |
Sets the name localizations
Name | Type | Optional | Description |
---|---|---|---|
localizedNames | LocalizationMap | null | No | The dictionary of localized descriptions to set |
Sets the type
Name | Type | Optional | Description |
---|---|---|---|
type | ContextMenuCommandType | No | The type |
Returns the final data that should be sent to Discord.