ApplicationCommandOptionBase
The base application command option builder that contains common symbols for application command builders.
export declare abstract class ApplicationCommandOptionBase extends SharedNameAndDescription
export declare abstract class ApplicationCommandOptionBase extends SharedNameAndDescription
Extends
SharedNameAndDescriptionReadonly
Optional
The description localizations of this command.Inherited from SharedNameAndDescription
Readonly
description
:
string
The description of this command.Inherited from SharedNameAndDescription
Readonly
Optional
The name localizations of this command.Inherited from SharedNameAndDescription
Readonly
name
:
string
The name of this command.Inherited from SharedNameAndDescription
Readonly
required
:
boolean
Whether this option is required.
Default value
false
Readonly
The type of this option.
Protected
runRequiredValidations()
:
void
This method runs required validators on this builder.
setDescription(description)
:
this
Sets the description of this command.
Inherited from SharedNameAndDescription
Name | Type | Optional | Description |
---|---|---|---|
description | string | No | The description to use |
setDescriptionLocalization(locale, localizedDescription)
:
this
Sets a description localization for this command.
Inherited from SharedNameAndDescription
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.
Inherited from SharedNameAndDescription
Name | Type | Optional | Description |
---|---|---|---|
localizedDescriptions | LocalizationMap | null | No | The object of localized descriptions to set |
setName(name)
:
this
Sets the name of this command.
Inherited from SharedNameAndDescription
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The name to use |
setNameLocalization(locale, localizedName)
:
this
Sets a name localization for this command.
Inherited from SharedNameAndDescription
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.
Inherited from SharedNameAndDescription
Name | Type | Optional | Description |
---|---|---|---|
localizedNames | LocalizationMap | null | No | The object of localized names to set |
setRequired(required)
:
this
Sets whether this option is required.
Name | Type | Optional | Description |
---|---|---|---|
required | boolean | No | Whether this option should be required |
Serializes this builder to API-compatible JSON data.