Functionseedcordv0.14.0Decorator
ContextMenuRoute
Routes one or more context-menu commands to a ContextMenuHandlerContextMenuHandler.
Pass the kind (ApplicationCommandType.UserApplicationCommandType.User or ApplicationCommandType.MessageApplicationCommandType.Message) and the command name(s), each checked against that kind's registry, so a typo is a compile error. The same kind must sit on the handler's generic, cross-checked both directions. Context menus carry no options, so a multi-name handler reads this.targetthis.target uniformly with no branch.
ContextMenuRoute<Kind>(
kind: Kind,
names: NamesFor<Kind>[]
): <
TCtor extends new (
...args: any[]
) => InteractionHandler<Repliables>
>(
constructor: AssertContextMenuRoute<Kind, TCtor>
) => voidContextMenuRoute<Kind>(
kind: Kind,
names: NamesFor<Kind>[]
): <
TCtor extends new (
...args: any[]
) => InteractionHandler<Repliables>
>(
constructor: AssertContextMenuRoute<Kind, TCtor>
) => voidKind
KindKind