SlashCommandSubcommandGroupBuilder
declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions
declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions
Represents a folder for subcommandsFor more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups
Implements
ToAPIApplicationCommandOptionsReadonly
description
:
string
The description of this subcommand group
Readonly
name
:
string
The name of this subcommand group
Readonly
The subcommands part of this subcommand group
Readonly
Optional
description_localizations?
:
LocalizationMap
Inherited from SharedNameAndDescription
Readonly
Optional
name_localizations?
:
LocalizationMap
Inherited from SharedNameAndDescription
addSubcommand(input)
:
this
Adds a new subcommand to this group
Name | Type | Optional | Description |
---|---|---|---|
input | SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder) | No | A function that returns a subcommand builder, or an already built builder |
toJSON()
:
APIApplicationCommandSubcommandGroupOption
setDescription(description)
:
this
Sets the description
Name | Type | Optional | Description |
---|---|---|---|
description | string | No | The description |
setDescriptionLocalization(locale, localizedDescription)
:
this
Sets a description localization
Name | Type | Optional | Description |
---|---|---|---|
locale | LocaleString | No | The locale to set a description for |
localizedDescription | string | null | No | The localized description for the given locale |
setDescriptionLocalizations(localizedDescriptions)
:
this
Sets the description localizations
Name | Type | Optional | Description |
---|---|---|---|
localizedDescriptions | LocalizationMap | null | No | The dictionary of localized descriptions to set |
setName(name)
:
this
setNameLocalization(locale, localizedName)
:
this
Sets a name localization
Name | Type | Optional | Description |
---|---|---|---|
locale | LocaleString | No | The locale to set a description for |
localizedName | string | null | No | The localized description for the given locale |
setNameLocalizations(localizedNames)
:
this
Sets the name localizations
Name | Type | Optional | Description |
---|---|---|---|
localizedNames | LocalizationMap | null | No | The dictionary of localized descriptions to set |