class StringSelectMenuOptionBuilder

external
declare class StringSelectMenuOptionBuilder implements JSONEncodable<APISelectMenuOption>

A builder that creates API-compatible JSON data for string select menu options.

Constructors

constructor()

Creates a new string select menu option from API data.

Examples:Creating a string select menu option from an API data object:
const selectMenuOption = new SelectMenuOptionBuilder({
	label: 'catchy label',
	value: '1',
});
Creating a string select menu option using setters and API data:
const selectMenuOption = new SelectMenuOptionBuilder({
	default: true,
	value: '1',
})
	.setLabel('woah');

external
clearDescription() : this

Clears the description for this option.

external
clearEmoji() : this

Clears the emoji for this option.

external
setDefault(
isDefault?: boolean
) : this

Sets whether this option is selected by default.

external
setDescription(
description: string
) : this

Sets the description for this option.

external
setEmoji() : this

Sets the emoji to display for this option.

external
setLabel(
label: string
) : this

Sets the label for this option.

external
setValue(
value: string
) : this

Sets the value for this option.

external
toJSON(
validationOverride?: boolean
) : APISelectMenuOption

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.