StringOptionBuilder
extends BaseOptionBuilder
Properties
.name
The option name
Type: string | null
.description
The option description
Type: string | null
.type
The option type
Type: number
.required
The option required
Type: boolean
.autocomplete
The option autocomplete
Type: boolean
.choices
The option choices
Type: RawApplicationCommandOptionChoiceData[]
.name_localizations
The option name localizations
Type: { [locale: string]: string }
.description_localizations
The option description localizations
Type: { [locale: string]: string }
Methods
.setName(name)
Set the option name
name
string
none
The option name
Returns: StringOptionBuilder
.setDescription(description)
Set the option description
description
string
none
The option description
Returns: StringOptionBuilder
.setRequired(required)
Set the option required
required
boolean
none
The option required
Returns: StringOptionBuilder
.setAutocomplete(autocomplete)
Set the option required
autocomplete
boolean
none
The option autocomplete
Returns: StringOptionBuilder
.addChoice(choice)
Add the option choice
choice
fn: (builder: ChoiceBuilder) => void
none
A function that returns an option builder
Returns: StringOptionBuilder
.addChoices(...choices)
Add the option choices
...choices
((builder: ChoiceBuilder) => void)[]
none
A function that returns an option builder
Returns: StringOptionBuilder
.toJSON()
Returns the properties of the class in the object type.
Returns: { [property: string]: any }
Last updated