declare class SlashCommandBuilderA builder that creates API-compatible JSON data for slash commands.
readonlyoptionalcontexts? : InteractionContextType[]
The contexts for this command.
readonlydefault_member_permissions : Permissions | null | undefined
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.
readonlyoptionaldescription_localizations? : LocalizationMap
The description localizations of this command.
readonlydescription : string
The description of this command.
Use contexts instead.
Indicates whether the command is available in direct messages with the application.
readonlyoptionalintegration_types? : ApplicationIntegrationType[]
The integration types for this command.
readonlyoptionalname_localizations? : LocalizationMap
The name localizations of this command.
readonlyname : string
The name of this command.
readonlyoptions : ToAPIApplicationCommandOptions[]
The options of this command.
addAttachmentOption(input: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)) : TypeAfterAddingOptions
Adds an attachment option.
Inherited from: SharedSlashCommandOptions
addBooleanOption(input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)) : TypeAfterAddingOptions
Adds a boolean option.
Inherited from: SharedSlashCommandOptions
addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)) : TypeAfterAddingOptions
Adds a channel option.
Inherited from: SharedSlashCommandOptions
addIntegerOption(input: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)) : TypeAfterAddingOptions
Adds an integer option.
Inherited from: SharedSlashCommandOptions
addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)) : TypeAfterAddingOptions
Adds a mentionable option.
Inherited from: SharedSlashCommandOptions
addNumberOption(input: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)) : TypeAfterAddingOptions
Adds a number option.
Inherited from: SharedSlashCommandOptions
addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) : TypeAfterAddingOptions
Adds a role option.
Inherited from: SharedSlashCommandOptions
addStringOption(input: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)) : TypeAfterAddingOptions
Adds a string option.
Inherited from: SharedSlashCommandOptions
addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)) : TypeAfterAddingSubcommands
Adds a new subcommand to this command.
Inherited from: SharedSlashCommandSubcommands
addSubcommandGroup(input: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)) : TypeAfterAddingSubcommands
Adds a new subcommand group to this command.
Inherited from: SharedSlashCommandSubcommands
addUserOption(input: 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
setDefaultMemberPermissions(permissions: 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 setDefaultPermission(value: 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
setDescription(description: string) : this
Sets the description of this command.
Inherited from: SharedNameAndDescription
setDescriptionLocalization(locale: LocaleString) : this
Sets a description localization for this command.
Inherited from: SharedNameAndDescription
setDescriptionLocalizations(localizedDescriptions: 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
setNameLocalization(locale: LocaleString) : this
Sets a name localization for this command.
Inherited from: SharedNameAndDescription
setNameLocalizations(localizedNames: LocalizationMap | null) : this
Sets the name localizations for this command.
Inherited from: SharedNameAndDescription
Serializes this builder to API-compatible JSON data.
Inherited from: SharedSlashCommand