export declare class SlashCommandBuilder
A builder that creates API-compatible JSON data for slash commands.
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.
Indicates whether the command is available in direct messages with the application.
readonlyoptionalLocalizationMap name_localizations? :
The name localizations of this command.
readonlystring name :
The name of this command.
readonlyToAPIApplicationCommandOptions[] options :
The options of this command.
readonlyoptionalLocalizationMap description_localizations? :
The description localizations of this command.
Inherited from: SharedNameAndDescription
readonlystring description :
The description of this command.
Inherited from: SharedNameAndDescription
readonlyoptionalLocalizationMap name_localizations? :
The name localizations of this command.
Inherited from: SharedNameAndDescription
readonlyToAPIApplicationCommandOptions[] options :
Inherited from: SharedSlashCommandOptions
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.
See also: https://discord.com/developers/docs/interactions/application-commands#permissions
deprecated setDefaultPermissionvalue: boolean) : this (
Sets whether the command is enabled by default when the application is added to a guild.
See also: https://discord.com/developers/docs/interactions/application-commands#permissions
Sets if the command is available in direct messages with the application.
See also: https://discord.com/developers/docs/interactions/application-commands#permissions
setNSFWnsfw?: boolean) : this (
Sets whether this command is NSFW.
Serializes this builder to API-compatible JSON data.
addAttachmentOptioninput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds an attachment option.
Inherited from: SharedSlashCommandOptions
addBooleanOptioninput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds a boolean option.
Inherited from: SharedSlashCommandOptions
addChannelOptioninput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds a channel option.
Inherited from: SharedSlashCommandOptions
addIntegerOptioninput: Pick<SlashCommandIntegerOption, Exclude<keyof SlashCommandIntegerOption, 'addChoices'>> | Pick<SlashCommandIntegerOption, Exclude<keyof SlashCommandIntegerOption, 'setAutocomplete'>> | SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => Pick<SlashCommandIntegerOption, Exclude<keyof SlashCommandIntegerOption, 'addChoices'>> | Pick<SlashCommandIntegerOption, Exclude<keyof SlashCommandIntegerOption, 'setAutocomplete'>> | SlashCommandIntegerOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds an integer option.
Inherited from: SharedSlashCommandOptions
addMentionableOptioninput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds a mentionable option.
Inherited from: SharedSlashCommandOptions
addNumberOptioninput: Pick<SlashCommandNumberOption, Exclude<keyof SlashCommandNumberOption, 'addChoices'>> | Pick<SlashCommandNumberOption, Exclude<keyof SlashCommandNumberOption, 'setAutocomplete'>> | SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => Pick<SlashCommandNumberOption, Exclude<keyof SlashCommandNumberOption, 'addChoices'>> | Pick<SlashCommandNumberOption, Exclude<keyof SlashCommandNumberOption, 'setAutocomplete'>> | SlashCommandNumberOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds a number option.
Inherited from: SharedSlashCommandOptions
addRoleOptioninput: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds a role option.
Inherited from: SharedSlashCommandOptions
addStringOptioninput: Pick<SlashCommandStringOption, Exclude<keyof SlashCommandStringOption, 'addChoices'>> | Pick<SlashCommandStringOption, Exclude<keyof SlashCommandStringOption, 'setAutocomplete'>> | SlashCommandStringOption | ((builder: SlashCommandStringOption) => Pick<SlashCommandStringOption, Exclude<keyof SlashCommandStringOption, 'addChoices'>> | Pick<SlashCommandStringOption, Exclude<keyof SlashCommandStringOption, 'setAutocomplete'>> | SlashCommandStringOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds a string option.
Inherited from: SharedSlashCommandOptions
addUserOptioninput: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) : ShouldOmitSubcommandFunctions extends true ? Pick<this, Exclude<keyof this, "addSubcommand" | "addSubcommandGroup">> : this (
Adds a user option.
Inherited from: SharedSlashCommandOptions
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
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