Skip to content

StringSelectMenu

Represents a Select Menu for selecting string options.

Example

1
const stringSelectMenu = new StringSelectMenu();
2
stringSelectMenu.setCustomId("string-select");
3
stringSelectMenu.addOption(new StringSelectOption().setLabel("Option 1").setValue("option_1"));
4
stringSelectMenu.setOptions([
5
{ label: "Option 2", value: "option_2" },
6
{ label: "Option 3", value: "option_3" },
7
]);

Extends

  • Object

Constructors

new StringSelectMenu(data)

1
new StringSelectMenu(data: Partial<APIStringSelectComponent>): StringSelectMenu

Parameters

ParameterType
dataPartial<APIStringSelectComponent>

Returns

StringSelectMenu

Overrides

`(SelectMenu as unknown as ToClass< Omit<SelectMenu<APIStringSelectComponent, StringSelectMenuInteraction>, ‘data’ | ‘toJSON’>, StringSelectMenu

).constructor`

Source

seyfert/src/builders/SelectMenu.ts:282

Properties

PropertyType
dataOmit<APIStringSelectComponent, "options"> & Object

Methods

addOption()

1
addOption(...options: RestOrArray<StringSelectOption>): this

Adds options to the string select menu.

Parameters

ParameterTypeDescription
optionsRestOrArray<StringSelectOption>Options to be added.

Returns

this

The current StringSelectMenu instance.

Source

seyfert/src/builders/SelectMenu.ts:292


setCustomId()

1
setCustomId(...args: [string]): StringSelectMenu

Sets the custom ID for the select menu.

Parameters

ParameterType
args[string]

Returns

StringSelectMenu

The current SelectMenu instance.

Inherited from

`(SelectMenu as unknown as ToClass< Omit<SelectMenu<APIStringSelectComponent, StringSelectMenuInteraction>, ‘data’ | ‘toJSON’>, StringSelectMenu

).setCustomId`

Source

seyfert/src/builders/SelectMenu.ts:71


setDisabled()

1
setDisabled(...args: [boolean]): StringSelectMenu

Sets whether the select menu is disabled. [disabled=true] - Indicates whether the select menu is disabled.

Parameters

ParameterType
args[boolean]

Returns

StringSelectMenu

The current SelectMenu instance.

Inherited from

`(SelectMenu as unknown as ToClass< Omit<SelectMenu<APIStringSelectComponent, StringSelectMenuInteraction>, ‘data’ | ‘toJSON’>, StringSelectMenu

).setDisabled`

Source

seyfert/src/builders/SelectMenu.ts:102


setOptions()

1
setOptions(options: StringSelectOption[]): this

Sets the options for the string select menu. options - Options to be set.

Parameters

ParameterType
optionsStringSelectOption[]

Returns

this

The current StringSelectMenu instance.

Source

seyfert/src/builders/SelectMenu.ts:302


setPlaceholder()

1
setPlaceholder(...args: [string]): StringSelectMenu

Sets the placeholder text for the select menu.

Parameters

ParameterType
args[string]

Returns

StringSelectMenu

The current SelectMenu instance.

Inherited from

`(SelectMenu as unknown as ToClass< Omit<SelectMenu<APIStringSelectComponent, StringSelectMenuInteraction>, ‘data’ | ‘toJSON’>, StringSelectMenu

).setPlaceholder`

Source

seyfert/src/builders/SelectMenu.ts:81


setValuesLength()

1
setValuesLength(...args: [Partial<OptionValuesLength>]): StringSelectMenu

Sets the maximum and minimum number of selected values for the select menu.

Parameters

ParameterType
args[Partial<OptionValuesLength>]

Returns

StringSelectMenu

The current SelectMenu instance.

Inherited from

`(SelectMenu as unknown as ToClass< Omit<SelectMenu<APIStringSelectComponent, StringSelectMenuInteraction>, ‘data’ | ‘toJSON’>, StringSelectMenu

).setValuesLength`

Source

seyfert/src/builders/SelectMenu.ts:91


toJSON()

1
toJSON(): APIStringSelectComponent

Returns

APIStringSelectComponent

Source

seyfert/src/builders/SelectMenu.ts:307