declare class SlashCommandBuilder
readonlyPermissions | null | undefined default_member_permissions :
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.
Whether the command is enabled by default when the app is added to a guild
readonlyoptionalLocalizationMap description_localizations? :
The localized descriptions for this command
readonlystring description :
The description of this slash command
Indicates whether the command is available in DMs with the application, only for globally-scoped commands. By default, commands are visible.
readonlyoptionalLocalizationMap name_localizations? :
The localized names for this command
readonlystring name :
The name of this slash command
readonlyToAPIApplicationCommandOptions[] options :
The options of this slash command
addSubcommandinput: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)) : SlashCommandSubcommandsOnlyBuilder (
Adds a new subcommand to this command
addSubcommandGroupinput: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)) : SlashCommandSubcommandsOnlyBuilder (
Adds a new subcommand group to this command
setDefaultMemberPermissionspermissions: Permissions | bigint | number | null | undefined) : this (
Sets the default permissions a member should have in order to run the command.**Note:** You can set this to '0'
to disable the command by default.
See also: https://discord.com/developers/docs/interactions/application-commands#permissions
deprecated setDefaultPermissionvalue: boolean) : this (
Use setDefaultMemberPermissions
or setDMPermission
instead.
Sets whether the command is enabled by default when the application is added to a guild.**Note**: If set to false
, you will have to later PUT
the permissions for this command.
See also: https://discord.com/developers/docs/interactions/application-commands#permissions
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#permissions
toJSONRESTPostAPIApplicationCommandsJSONBody () :
Returns the final data that should be sent to Discord.**Note:** Calling this function will validate required properties based on their conditions.