Skip to content

UserSelectMenu

Represents a Select Menu for selecting users.

Example

1
const userSelectMenu = new UserSelectMenu();
2
userSelectMenu.setCustomId("user-select");
3
userSelectMenu.addDefaultUsers("123456789", "987654321");

Extends

Constructors

new UserSelectMenu(data)

1
new UserSelectMenu(data: Partial<APIUserSelectComponent>): UserSelectMenu

Parameters

ParameterType
dataPartial<APIUserSelectComponent>

Returns

UserSelectMenu

Overrides

SelectMenu.constructor

Source

seyfert/src/builders/SelectMenu.ts:116

Properties

PropertyModifierTypeInherited from
datapublicPartial<APIUserSelectComponent>SelectMenu.data

Methods

addDefaultUsers()

1
addDefaultUsers(...users: RestOrArray<string>): this

Adds default selected users to the select menu.

Parameters

ParameterTypeDescription
usersRestOrArray<string>User IDs to be added as default.

Returns

this

The current UserSelectMenu instance.

Source

seyfert/src/builders/SelectMenu.ts:125


setCustomId()

1
setCustomId(id: string): this

Sets the custom ID for the select menu.

Parameters

ParameterTypeDescription
idstringThe custom ID for the select menu.

Returns

this

The current SelectMenu instance.

Inherited from

SelectMenu.setCustomId

Source

seyfert/src/builders/SelectMenu.ts:71


setDefaultUsers()

1
setDefaultUsers(...users: RestOrArray<string>): this

Sets the default selected users for the select menu.

Parameters

ParameterTypeDescription
usersRestOrArray<string>User IDs to be set as default.

Returns

this

The current UserSelectMenu instance.

Source

seyfert/src/builders/SelectMenu.ts:137


setDisabled()

1
setDisabled(disabled: boolean): this

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

Parameters

ParameterTypeDefault value
disabledbooleantrue

Returns

this

The current SelectMenu instance.

Inherited from

SelectMenu.setDisabled

Source

seyfert/src/builders/SelectMenu.ts:102


setPlaceholder()

1
setPlaceholder(placeholder: string): this

Sets the placeholder text for the select menu.

Parameters

ParameterTypeDescription
placeholderstringThe placeholder text.

Returns

this

The current SelectMenu instance.

Inherited from

SelectMenu.setPlaceholder

Source

seyfert/src/builders/SelectMenu.ts:81


setValuesLength()

1
setValuesLength(options: Partial<OptionValuesLength>): this

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

Parameters

ParameterTypeDescription
optionsPartial<OptionValuesLength>The maximum and minimum values.

Returns

this

The current SelectMenu instance.

Inherited from

SelectMenu.setValuesLength

Source

seyfert/src/builders/SelectMenu.ts:91


toJSON()

1
toJSON(): APIUserSelectComponent

Returns

APIUserSelectComponent

Inherited from

SelectMenu.toJSON

Source

seyfert/src/builders/Base.ts:8