Skip to content
Functioncorev0.14.0Decorator

ChannelMenuRoute

Routes channel select menu interactions to a ChannelMenuHandler.

Pass the CustomId definition(s) this handler decodes and list the same ones in the handler's generic. Beside this.values the handler declares this.channels.

ChannelMenuRoute<Defs>(
    defs: Defs
): <TCtor extends AnyHandlerCtor>(
    constructor: AssertComponentRoute<InteractionKind.ChannelMenu, Defs, TCtor>
) => void
\@ChannelMenuRoute(LogTargetId)
class LogTarget extends ChannelMenuHandler<[typeof LogTargetId]> {
    async execute() {
        await this.update(`logging to ${this.channels.size} channel(s)`);
    }
}

Defs

Defs

defs

defs: Defs

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