StringSelectOption

Represents an individual option for a string select menu.

Signature

export declare class StringSelectOption
JSDoc
Examples
const option = new StringSelectOption().setLabel("Option 1").setValue("option_1");

Properties

Methods

setLabel(label: string): this;

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

Returns

The current StringSelectOption instance.

setValue(value: string): this;

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

Returns

The current StringSelectOption instance.

setDescription(description: string): this;

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

Returns

The current StringSelectOption instance.

setDefault(value?: boolean): this;

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

Returns

The current StringSelectOption instance.

setEmoji(emoji: EmojiResolvable): this;

Sets the emoji for the option.

Parameters
emoji
The emoji to set.
Returns

The modified option instance.