ChannelSelectMenu
Represents a Select Menu for selecting channels.
Signature
export declare class ChannelSelectMenu extends SelectMenu<APIChannelSelectComponent>JSDoc
Examples
const channelSelectMenu = new ChannelSelectMenu();
channelSelectMenu.setCustomId("channel-select");
channelSelectMenu.addDefaultChannels("123456789", "987654321");
channelSelectMenu.setChannelTypes([ChannelType.GuildText, ChannelType.GuildVoice]);Properties
0No properties.
Methods
4Methods
constructorConstructorconstructor(data?: Partial<APIChannelSelectComponent>);addDefaultChannels(...channels: RestOrArray<string>): this;Adds default selected channels to the select menu.
Parameters
channels- Channel IDs to be added as default.
Returns
The current ChannelSelectMenu instance.
setDefaultChannels(...channels: RestOrArray<string>): this;Sets the default selected channels for the select menu.
Parameters
channels- Channel IDs to be set as default.
Returns
The current ChannelSelectMenu instance.
setChannelTypes(types: ChannelType[]): this;Sets the types of channels that can be selected in the menu. types - The types of channels.
Returns
The current ChannelSelectMenu instance.