Skip to main content
Version: Next

MentionableSelectMenuKit

MentionableSelectMenuKit

Signature
class MentionableSelectMenuKit extends MentionableSelectMenuBuilder {
onSelect(handler: CommandKitSelectMenuBuilderInteractionCollectorDispatch<
MentionableSelectMenuInteraction,
MentionableSelectMenuKit
>, data?: CommandKitSelectMenuBuilderInteractionCollectorDispatchContextData) => this;
onEnd(handler: CommandKitSelectMenuBuilderOnEnd) => this;
onError(handler: EventInterceptorErrorHandler) => this;
filter(predicate: SelectMenuKitPredicate<MentionableSelectMenuInteraction>) => this;
dispose() => ;
}
  • Extends: MentionableSelectMenuBuilder

onSelect

Sets the handler to run when the modal is submitted.

Example

const modal = new MentionableSelectMenuKit()
.setTitle('My Modal')
.setCustomId('my-modal')
.filter((interaction) => interaction.Mentionable.id === '1234567890')
.onSelect(async (interaction) => {
await interaction.reply('You submitted the modal!');
})
.addComponents(actionRow1, actionRow2);

onEnd

method

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<MentionableSelectMenuInteraction>) => this

Sets a filter for the interaction collector.

dispose

method
() =>

Disposes of the mentionable select menu kit, cleaning up any resources used by the interaction collector.