export declare class SlashCommandStringOption extends ApplicationCommandOptionBase
export declare class SlashCommandStringOption extends ApplicationCommandOptionBase
No summary provided.
Extends
ApplicationCommandOptionBaseReadonly
Optional
description_localizations?
:
LocalizationMap
Inherited from SharedNameAndDescription
Readonly
description
:
string
Inherited from SharedNameAndDescription
Readonly
Optional
max_length?
:
number
Readonly
Optional
min_length?
:
number
Readonly
Optional
name_localizations?
:
LocalizationMap
Inherited from SharedNameAndDescription
Readonly
name
:
string
Inherited from SharedNameAndDescription
Readonly
required
:
boolean
Inherited from ApplicationCommandOptionBase
Readonly
type
:
ApplicationCommandOptionType.String
Readonly
Optional
autocomplete?
:
boolean
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixin
Readonly
Optional
choices?
:
APIApplicationCommandOptionChoice<T>[]
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixin
Protected
runRequiredValidations()
:
void
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 |
setMaxLength(max)
:
this
Sets the maximum length of this string option.
Name | Type | Optional | Description |
---|---|---|---|
max | number | No | The maximum length this option can be |
setMinLength(min)
:
this
Sets the minimum length of this string option.
Name | Type | Optional | Description |
---|---|---|---|
min | number | No | The minimum length this option can be |
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 |
setRequired(required)
:
this
Marks the option as required
Name | Type | Optional | Description |
---|---|---|---|
required | boolean | No | If this option should be required |
toJSON()
:
APIApplicationCommandStringOption
addChoices(choices)
:
this
Adds multiple choices for this option
Name | Type | Optional | Description |
---|---|---|---|
choices | APIApplicationCommandOptionChoice<T>[] | No | The choices to add |
setAutocomplete(autocomplete)
:
this
Marks the option as autocompletable
Name | Type | Optional | Description |
---|---|---|---|
autocomplete | boolean | No | If this option should be autocompletable |
setChoices(choices)
:
this
Name | Type | Optional | Description |
---|---|---|---|
choices | Input | No | None |