Skip to content

StringSelectOption

Represents an individual option for a string select menu.

Example

1
const option = new StringSelectOption().setLabel("Option 1").setValue("option_1");

Constructors

new StringSelectOption(data)

1
new StringSelectOption(data: Partial<APISelectMenuOption>): StringSelectOption

Parameters

ParameterType
dataPartial<APISelectMenuOption>

Returns

StringSelectOption

Source

seyfert/src/builders/SelectMenu.ts:322

Properties

PropertyModifierType
datapublicPartial<APISelectMenuOption>

Methods

setDefault()

1
setDefault(Default: boolean): this

Sets whether the option is the default. [Default=true] - Indicates whether the option is the default.

Parameters

ParameterTypeDefault value
Defaultbooleantrue

Returns

this

The current StringSelectOption instance.

Source

seyfert/src/builders/SelectMenu.ts:359


setDescription()

1
setDescription(description: string): this

Sets the description for the option. description - The description for the option.

Parameters

ParameterType
descriptionstring

Returns

this

The current StringSelectOption instance.

Source

seyfert/src/builders/SelectMenu.ts:349


setEmoji()

1
setEmoji(emoji: EmojiResolvable): StringSelectOption

Sets the emoji for the option.

Parameters

ParameterTypeDescription
emojiEmojiResolvableThe emoji to set.

Returns

StringSelectOption

The modified option instance.

Source

seyfert/src/builders/SelectMenu.ts:369


setLabel()

1
setLabel(label: string): this

Sets the label for the option. label - The label for the option.

Parameters

ParameterType
labelstring

Returns

this

The current StringSelectOption instance.

Source

seyfert/src/builders/SelectMenu.ts:329


setValue()

1
setValue(value: string): this

Sets the value for the option. value - The value for the option.

Parameters

ParameterType
valuestring

Returns

this

The current StringSelectOption instance.

Source

seyfert/src/builders/SelectMenu.ts:339


toJSON()

1
toJSON(): APISelectMenuOption

Converts the option to JSON format.

Returns

APISelectMenuOption

The option data in JSON format.

Source

seyfert/src/builders/SelectMenu.ts:380