SlashCommandSubcommandGroupBuilder
export declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions
export declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions
Represents a folder for subcommands.
Implements
ToAPIApplicationCommandOptionsReadonly
description
:
string
The description of this subcommand group.
Readonly
name
:
string
The name of this subcommand group.
Readonly
The subcommands within this subcommand group.
Readonly
Optional
description_localizations?
:
LocalizationMap
The description localizations of this command.
Inherited from SharedNameAndDescriptionReadonly
Optional
name_localizations?
:
LocalizationMap
The name localizations of this command.
Inherited from SharedNameAndDescriptionaddSubcommand(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
Serializes this builder to API-compatible JSON data.
Remarks
This method runs validations on the data before serializing it. As such, it may throw an error if the data is invalid.setDescription(description)
:
this
Sets the description of this command.
Name | Type | Optional | Description |
---|---|---|---|
description | string | No | The description to use |
setDescriptionLocalization(locale, localizedDescription)
:
this
Sets a description localization for this command.
Name | Type | Optional | Description |
---|---|---|---|
locale | LocaleString | No | The locale to set |
localizedDescription | string | null | No | The localized description for the given locale |
setDescriptionLocalizations(localizedDescriptions)
:
this
Sets the description localizations for this command.
Name | Type | Optional | Description |
---|---|---|---|
localizedDescriptions | LocalizationMap | null | No | The object of localized descriptions to set |
setName(name)
:
this
Sets the name of this command.
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The name to use |
setNameLocalization(locale, localizedName)
:
this
Sets a name localization for this command.
Name | Type | Optional | Description |
---|---|---|---|
locale | LocaleString | No | The locale to set |
localizedName | string | null | No | The localized name for the given locale |
setNameLocalizations(localizedNames)
:
this
Sets the name localizations for this command.
Name | Type | Optional | Description |
---|---|---|---|
localizedNames | LocalizationMap | null | No | The object of localized names to set |