ChannelSelectMenu
Represents a Select Menu for selecting channels.
Example
1const channelSelectMenu = new ChannelSelectMenu();2channelSelectMenu.setCustomId("channel-select");3channelSelectMenu.addDefaultChannels("123456789", "987654321");4channelSelectMenu.setChannelTypes([ChannelType.GuildText, ChannelType.GuildVoice]);
Extends
SelectMenu
<APIChannelSelectComponent
,ChannelSelectMenuInteraction
>
Constructors
new ChannelSelectMenu(data)
1new ChannelSelectMenu(data: Partial<APIChannelSelectComponent>): ChannelSelectMenu
Parameters
Parameter | Type |
---|---|
data | Partial <APIChannelSelectComponent > |
Returns
Overrides
Source
seyfert/src/builders/SelectMenu.ts:229
Properties
Property | Modifier | Type | Inherited from |
---|---|---|---|
data | public | Partial <APIChannelSelectComponent > | SelectMenu .data |
Methods
addDefaultChannels()
1addDefaultChannels(...channels: RestOrArray<string>): this
Adds default selected channels to the select menu.
Parameters
Parameter | Type | Description |
---|---|---|
…channels | RestOrArray <string > | Channel IDs to be added as default. |
Returns
this
The current ChannelSelectMenu instance.
Source
seyfert/src/builders/SelectMenu.ts:238
setChannelTypes()
1setChannelTypes(types: ChannelType[]): this
Sets the types of channels that can be selected in the menu. types - The types of channels.
Parameters
Parameter | Type |
---|---|
types | ChannelType [] |
Returns
this
The current ChannelSelectMenu instance.
Source
seyfert/src/builders/SelectMenu.ts:260
setCustomId()
1setCustomId(id: string): this
Sets the custom ID for the select menu.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The custom ID for the select menu. |
Returns
this
The current SelectMenu instance.
Inherited from
Source
seyfert/src/builders/SelectMenu.ts:71
setDefaultChannels()
1setDefaultChannels(...channels: RestOrArray<string>): this
Sets the default selected channels for the select menu.
Parameters
Parameter | Type | Description |
---|---|---|
…channels | RestOrArray <string > | Channel IDs to be set as default. |
Returns
this
The current ChannelSelectMenu instance.
Source
seyfert/src/builders/SelectMenu.ts:250
setDisabled()
1setDisabled(disabled: boolean): this
Sets whether the select menu is disabled. [disabled=true] - Indicates whether the select menu is disabled.
Parameters
Parameter | Type | Default value |
---|---|---|
disabled | boolean | true |
Returns
this
The current SelectMenu instance.
Inherited from
Source
seyfert/src/builders/SelectMenu.ts:102
setPlaceholder()
1setPlaceholder(placeholder: string): this
Sets the placeholder text for the select menu.
Parameters
Parameter | Type | Description |
---|---|---|
placeholder | string | The placeholder text. |
Returns
this
The current SelectMenu instance.
Inherited from
Source
seyfert/src/builders/SelectMenu.ts:81
setValuesLength()
1setValuesLength(options: Partial<OptionValuesLength>): this
Sets the maximum and minimum number of selected values for the select menu.
Parameters
Parameter | Type | Description |
---|---|---|
options | Partial <OptionValuesLength > | The maximum and minimum values. |
Returns
this
The current SelectMenu instance.
Inherited from
Source
seyfert/src/builders/SelectMenu.ts:91
toJSON()
1toJSON(): APIChannelSelectComponent
Returns
APIChannelSelectComponent