class StringSelectMenuOptionBuilder

export 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');

setDefault(
isDefault?: boolean
) : this

Sets whether this option is selected by default.

setDescription(
description: string
) : this

Sets the description for this option.

setEmoji() : this

Sets the emoji to display for this option.

setLabel(
label: string
) : this

Sets the label for this option.

setValue(
value: string
) : this

Sets the value for this option.

Serializes this builder to API-compatible JSON data.