StringSelectMenu
Represents a Select Menu for selecting string options.
Example
1const stringSelectMenu = new StringSelectMenu();2stringSelectMenu.setCustomId("string-select");3stringSelectMenu.addOption(new StringSelectOption().setLabel("Option 1").setValue("option_1"));4stringSelectMenu.setOptions([5 { label: "Option 2", value: "option_2" },6 { label: "Option 3", value: "option_3" },7]);
Extends
Object
Constructors
new StringSelectMenu(data)
1new StringSelectMenu(data: Partial<APIStringSelectComponent>): StringSelectMenu
Parameters
Parameter | Type |
---|---|
data | Partial <APIStringSelectComponent > |
Returns
Overrides
`(SelectMenu as unknown as ToClass< Omit<SelectMenu<APIStringSelectComponent, StringSelectMenuInteraction>, ‘data’ | ‘toJSON’>, StringSelectMenu
).constructor`
Source
seyfert/src/builders/SelectMenu.ts:282
Properties
Property | Type |
---|---|
data | Omit <APIStringSelectComponent , "options" > & Object |
Methods
addOption()
1addOption(...options: RestOrArray<StringSelectOption>): this
Adds options to the string select menu.
Parameters
Parameter | Type | Description |
---|---|---|
…options | RestOrArray <StringSelectOption > | Options to be added. |
Returns
this
The current StringSelectMenu instance.
Source
seyfert/src/builders/SelectMenu.ts:292
setCustomId()
1setCustomId(...args: [string]): StringSelectMenu
Sets the custom ID for the select menu.
Parameters
Parameter | Type |
---|---|
…args | [string ] |
Returns
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()
1setDisabled(...args: [boolean]): StringSelectMenu
Sets whether the select menu is disabled. [disabled=true] - Indicates whether the select menu is disabled.
Parameters
Parameter | Type |
---|---|
…args | [boolean ] |
Returns
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()
1setOptions(options: StringSelectOption[]): this
Sets the options for the string select menu. options - Options to be set.
Parameters
Parameter | Type |
---|---|
options | StringSelectOption [] |
Returns
this
The current StringSelectMenu instance.
Source
seyfert/src/builders/SelectMenu.ts:302
setPlaceholder()
1setPlaceholder(...args: [string]): StringSelectMenu
Sets the placeholder text for the select menu.
Parameters
Parameter | Type |
---|---|
…args | [string ] |
Returns
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()
1setValuesLength(...args: [Partial<OptionValuesLength>]): StringSelectMenu
Sets the maximum and minimum number of selected values for the select menu.
Parameters
Parameter | Type |
---|---|
…args | [Partial <OptionValuesLength >] |
Returns
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()
1toJSON(): APIStringSelectComponent
Returns
APIStringSelectComponent