Skip to content
Functioncorev0.14.0Decorator

MentionableMenuRoute

Routes mentionable select menu interactions to a MentionableMenuHandler.

Pass the CustomId definition(s) this handler decodes and list the same ones in the handler's generic. A mentionable menu accepts users and roles together. this.users, this.members, and this.roles can each come back empty.

MentionableMenuRoute<Defs>(
    defs: Defs
): <TCtor extends AnyHandlerCtor>(
    constructor: AssertComponentRoute<InteractionKind.MentionableMenu, Defs, TCtor>
) => void
\@MentionableMenuRoute(InviteId)
class Invite extends MentionableMenuHandler<[typeof InviteId]> {
    async execute() {
        await this.update(`inviting ${this.users.size} user(s) and ${this.roles.size} role(s)`);
    }
}

Defs

Defs

defs

defs: Defs

The customId definition(s) this handler decodes, one per route.