Functioncorev0.1.4Decorator
ContextMenuRoute
Routes one or more context-menu commands to a ContextMenuHandler.
Pass the kind (ApplicationCommandType.User or ApplicationCommandType.Message) and the command name(s), each checked against that kind's registry. A typo there is a compile error. The handler's generic must declare the same kind, cross-checked both directions. Context menus carry no options, so a multi-name handler reads this.target uniformly with no branch.
ContextMenuRoute<Kind>(
kind: Kind,
names: NamesFor<Kind>[]
): <TCtor extends AnyHandlerCtor>(
constructor: AssertContextMenuRoute<Kind, TCtor>
) => voidKind
Kindkind
kind: KindThe context-menu kind, ApplicationCommandType.User or ApplicationCommandType.Message.
names
names: NamesFor<Kind>[]The command name(s) this handler serves, keyed off the matching registry.