class SlashCommandSubcommandBuilder

export declare class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions

A builder that creates API-compatible JSON data for slash command subcommands.

See also: https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups

readonly
description : string

The description of this subcommand.

readonly
name : string

The name of this subcommand.

readonly
options : ApplicationCommandOptionBase[]

The options within this subcommand.

readonlyoptional
description_localizations? : LocalizationMap

The description localizations of this command.

Inherited from: SharedNameAndDescription

readonly
description : string

The description of this command.

Inherited from: SharedNameAndDescription

readonlyoptional
name_localizations? : LocalizationMap

The name localizations of this command.

Inherited from: SharedNameAndDescription

readonly
name : string

The name of this command.

Inherited from: SharedNameAndDescription

readonly
options : ToAPIApplicationCommandOptions[]

Inherited from: SharedSlashCommandOptions

Serializes this builder to API-compatible JSON data.

addAttachmentOption() : TypeAfterAddingOptions

Adds an attachment option.

Inherited from: SharedSlashCommandOptions

addBooleanOption() : TypeAfterAddingOptions

Adds a boolean option.

Inherited from: SharedSlashCommandOptions

addChannelOption() : TypeAfterAddingOptions

Adds a channel option.

Inherited from: SharedSlashCommandOptions

addIntegerOption() : TypeAfterAddingOptions

Adds an integer option.

Inherited from: SharedSlashCommandOptions

addMentionableOption() : TypeAfterAddingOptions

Adds a mentionable option.

Inherited from: SharedSlashCommandOptions

addNumberOption() : TypeAfterAddingOptions

Adds a number option.

Inherited from: SharedSlashCommandOptions

addRoleOption() : TypeAfterAddingOptions

Adds a role option.

Inherited from: SharedSlashCommandOptions

addStringOption() : TypeAfterAddingOptions

Adds a string option.

Inherited from: SharedSlashCommandOptions

addUserOption() : TypeAfterAddingOptions

Adds a user option.

Inherited from: SharedSlashCommandOptions

setDescription(
description: string
) : this

Sets the description of this command.

Inherited from: SharedNameAndDescription

setDescriptionLocalization(
locale: LocaleString
localizedDescription: string | null
) : 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

setName(
name: string
) : this

Sets the name of this command.

Inherited from: SharedNameAndDescription

setNameLocalization(
locale: LocaleString
localizedName: string | null
) : 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