SlashCommandStringOption

export declare class SlashCommandStringOption extends ApplicationCommandOptionBase
export declare class SlashCommandStringOption extends ApplicationCommandOptionBase
A slash command string option.
Readonly
description_localizations?:LocalizationMap
The description localizations of this command.
Inherited from SharedNameAndDescription
Readonly
description:string
The description of this command.
Inherited from SharedNameAndDescription
Readonly
max_length?:number
The maximum length of this option.
Readonly
min_length?:number
The minimum length of this option.
Readonly
name_localizations?:LocalizationMap
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
Inherited from ApplicationCommandOptionBase
The type of this option.
Readonly
autocomplete?:boolean
Whether this option utilizes autocomplete.
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixin
Readonly
The choices of this option.
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixin
Protected
runRequiredValidations():void
This method runs required validators on this builder.
Inherited from ApplicationCommandOptionBase
setDescription(description):this
Sets the description of this command.
NameTypeOptionalDescription
descriptionstringNo
The description to use
Inherited from SharedNameAndDescription
setDescriptionLocalization(locale, localizedDescription):this
Sets a description localization for this command.
NameTypeOptionalDescription
localeLocaleStringNo
The locale to set
localizedDescriptionstring | nullNo
The localized description for the given locale
Inherited from SharedNameAndDescription
setDescriptionLocalizations(localizedDescriptions):this
Sets the description localizations for this command.
NameTypeOptionalDescription
localizedDescriptionsLocalizationMap | nullNo
The object of localized descriptions to set
Inherited from SharedNameAndDescription
setMaxLength(max):this
Sets the maximum length of this string option.
NameTypeOptionalDescription
maxnumberNo
The maximum length this option can be
setMinLength(min):this
Sets the minimum length of this string option.
NameTypeOptionalDescription
minnumberNo
The minimum length this option can be
setName(name):this
Sets the name of this command.
NameTypeOptionalDescription
namestringNo
The name to use
Inherited from SharedNameAndDescription
setNameLocalization(locale, localizedName):this
SSets a name localization for this command.
NameTypeOptionalDescription
localeLocaleStringNo
The locale to set
localizedNamestring | nullNo
The localized name for the given locale
Inherited from SharedNameAndDescription
setNameLocalizations(localizedNames):this
Sets the name localizations for this command.
NameTypeOptionalDescription
localizedNamesLocalizationMap | nullNo
The object of localized names to set
Inherited from SharedNameAndDescription
setRequired(required):this
Sets whether this option is required.
NameTypeOptionalDescription
requiredbooleanNo
Whether this option should be required
Inherited from ApplicationCommandOptionBase
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.
addChoices(choices):this
Adds multiple choices to this option.
NameTypeOptionalDescription
choicesAPIApplicationCommandOptionChoice<T>[]No
The choices to add
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixin
setAutocomplete(autocomplete):this
Whether this option uses autocomplete.
NameTypeOptionalDescription
autocompletebooleanNo
Whether this option should use autocomplete
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixin
setChoices(choices):this
Sets multiple choices for this option.
NameConstraintsOptionalDefaultDescription
InputAPIApplicationCommandOptionChoice<T>[]NoNone
NameTypeOptionalDescription
choicesInputNo
The choices to set
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixin