Skip to content

ChannelSelectMenu

Represents a Select Menu for selecting channels.

Example

1
const channelSelectMenu = new ChannelSelectMenu();
2
channelSelectMenu.setCustomId("channel-select");
3
channelSelectMenu.addDefaultChannels("123456789", "987654321");
4
channelSelectMenu.setChannelTypes([ChannelType.GuildText, ChannelType.GuildVoice]);

Extends

Constructors

new ChannelSelectMenu(data)

1
new ChannelSelectMenu(data: Partial<APIChannelSelectComponent>): ChannelSelectMenu

Parameters

ParameterType
dataPartial<APIChannelSelectComponent>

Returns

ChannelSelectMenu

Overrides

SelectMenu.constructor

Source

seyfert/src/builders/SelectMenu.ts:229

Properties

PropertyModifierTypeInherited from
datapublicPartial<APIChannelSelectComponent>SelectMenu.data

Methods

addDefaultChannels()

1
addDefaultChannels(...channels: RestOrArray<string>): this

Adds default selected channels to the select menu.

Parameters

ParameterTypeDescription
channelsRestOrArray<string>Channel IDs to be added as default.

Returns

this

The current ChannelSelectMenu instance.

Source

seyfert/src/builders/SelectMenu.ts:238


setChannelTypes()

1
setChannelTypes(types: ChannelType[]): this

Sets the types of channels that can be selected in the menu. types - The types of channels.

Parameters

ParameterType
typesChannelType[]

Returns

this

The current ChannelSelectMenu instance.

Source

seyfert/src/builders/SelectMenu.ts:260


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


setDefaultChannels()

1
setDefaultChannels(...channels: RestOrArray<string>): this

Sets the default selected channels for the select menu.

Parameters

ParameterTypeDescription
channelsRestOrArray<string>Channel IDs to be set as default.

Returns

this

The current ChannelSelectMenu instance.

Source

seyfert/src/builders/SelectMenu.ts:250


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(): APIChannelSelectComponent

Returns

APIChannelSelectComponent

Inherited from

SelectMenu.toJSON

Source

seyfert/src/builders/Base.ts:8