ChannelSelectMenuKit
ChannelSelectMenuKit
Signature
class ChannelSelectMenuKit extends ChannelSelectMenuBuilder {
onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<
ChannelSelectMenuInteraction,
ChannelSelectMenuKit
>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData) => this;
onEnd(handler: CommandKitSelectMenuBuilderOnEnd) => this;
onError(handler: EventInterceptorErrorHandler) => this;
filter(predicate: SelectMenuKitPredicate<ChannelSelectMenuInteraction>) => this;
dispose() => ;
}
- Extends:
ChannelSelectMenuBuilder
onSelect
method
(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch< ChannelSelectMenuInteraction, ChannelSelectMenuKit >, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData) => this
Sets the handler to run when the modal is submitted.
Example
const modal = new ChannelSelectMenuKit()
.setTitle('My Modal')
.setCustomId('my-modal')
.filter((interaction) => interaction.Channel.id === '1234567890')
.onSelect(async (interaction) => {
await interaction.reply('You submitted the modal!');
})
.addComponents(actionRow1, actionRow2);
onEnd
method
(handler: CommandKitSelectMenuBuilderOnEnd) => this
Sets the handler to run when the interaction collector ends.
onError
method
(handler: EventInterceptorErrorHandler) => this
Sets the handler to run when the interaction collector ends.
filter
method
(predicate: SelectMenuKitPredicate<ChannelSelectMenuInteraction>) => this
Sets a filter for the interaction collector.
dispose
method
() =>