export declare class SlashCommandBuilder
A builder that creates API-compatible JSON data for slash commands.
readonlyoptionalInteractionContextType[] contexts? :
The contexts for this command.
readonlyPermissions | null | undefined default_member_permissions :
The set of permissions represented as a bit set for the command.
Use setDefaultMemberPermissions or setDMPermission instead.
Whether this command is enabled by default when the application is added to a guild.
readonlyoptionalLocalizationMap description_localizations? :
The description localizations of this command.
readonlystring description :
The description of this command.
Use contexts instead.
Indicates whether the command is available in direct messages with the application.
readonlyoptionalApplicationIntegrationType[] integration_types? :
The integration types for this command.
readonlyoptionalLocalizationMap name_localizations? :
The name localizations of this command.
readonlystring name :
The name of this command.
readonlyToAPIApplicationCommandOptions[] options :
The options of this command.
addAttachmentOptioninput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)) : TypeAfterAddingOptions (
Adds an attachment option.
Inherited from: SharedSlashCommandOptions
addBooleanOptioninput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)) : TypeAfterAddingOptions (
Adds a boolean option.
Inherited from: SharedSlashCommandOptions
addChannelOptioninput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)) : TypeAfterAddingOptions (
Adds a channel option.
Inherited from: SharedSlashCommandOptions
addIntegerOptioninput: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)) : TypeAfterAddingOptions (
Adds an integer option.
Inherited from: SharedSlashCommandOptions
addMentionableOptioninput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)) : TypeAfterAddingOptions (
Adds a mentionable option.
Inherited from: SharedSlashCommandOptions
addNumberOptioninput: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)) : TypeAfterAddingOptions (
Adds a number option.
Inherited from: SharedSlashCommandOptions
addRoleOptioninput: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) : TypeAfterAddingOptions (
Adds a role option.
Inherited from: SharedSlashCommandOptions
addStringOptioninput: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)) : TypeAfterAddingOptions (
Adds a string option.
Inherited from: SharedSlashCommandOptions
addSubcommandinput: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)) : TypeAfterAddingSubcommands (
Adds a new subcommand to this command.
Inherited from: SharedSlashCommandSubcommands
addSubcommandGroupinput: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)) : TypeAfterAddingSubcommands (
Adds a new subcommand group to this command.
Inherited from: SharedSlashCommandSubcommands
addUserOptioninput: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) : TypeAfterAddingOptions (
Adds a user option.
Inherited from: SharedSlashCommandOptions
setContexts...contexts: RestOrArray<InteractionContextType>) : this (
Sets the contexts of this command.
Inherited from: SharedSlashCommand
setDefaultMemberPermissionspermissions: Permissions | bigint | number | null | undefined) : this (
Sets the default permissions a member should have in order to run the command.
Inherited from: SharedSlashCommand
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.
Inherited from: SharedSlashCommand
See also: https://discord.com/developers/docs/interactions/application-commands#permissions
setDescriptiondescription: string) : this (
Sets the description of this command.
Inherited from: SharedNameAndDescription
setDescriptionLocalizationlocale: LocaleString) : this (
Sets a description localization for this command.
Inherited from: SharedNameAndDescription
setDescriptionLocalizationslocalizedDescriptions: LocalizationMap | null) : this (
Sets the description localizations for this command.
Inherited from: SharedNameAndDescription
Use setContexts instead.
Sets if the command is available in direct messages with the application.
Inherited from: SharedSlashCommand
See also: https://discord.com/developers/docs/interactions/application-commands#permissions
setIntegrationTypes...integrationTypes: RestOrArray<ApplicationIntegrationType>) : this (
Sets the integration types of this command.
Inherited from: SharedSlashCommand
setNameLocalizationlocale: LocaleString) : this (
Sets a name localization for this command.
Inherited from: SharedNameAndDescription
setNameLocalizationslocalizedNames: LocalizationMap | null) : this (
Sets the name localizations for this command.
Inherited from: SharedNameAndDescription
Serializes this builder to API-compatible JSON data.
Inherited from: SharedSlashCommand