StringSelectMenuOptionBuilder

export class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption
export class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption
Represents a select menu option builder.
constructor(data?)
Constructs a new instance of the StringSelectMenuOptionBuilder class
NameTypeOptionalDescription
dataSelectMenuComponentOptionData | APISelectMenuOptionYesNone
data:Partial<APISelectMenuOption>
Creates a new select menu option builder from JSON data
NameTypeOptionalDescription
otherJSONEncodable<APISelectMenuOption> | APISelectMenuOptionNoThe other data
setDefault(isDefault?):this
Sets whether this option is selected by default.
NameTypeOptionalDescription
isDefaultbooleanYesWhether this option is selected by default
setDescription(description):this
Sets the description for this option.
NameTypeOptionalDescription
descriptionstringNoThe description to use
setEmoji(emoji):this
Sets the emoji to display on this option
NameTypeOptionalDescription
emojiComponentEmojiResolvableNoThe emoji to display on this option
setLabel(label):this
Sets the label for this option.
NameTypeOptionalDescription
labelstringNoThe label to use
setValue(value):this
Sets the value for this option.
NameTypeOptionalDescription
valuestringNoThe value to use
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.