Functioncorev0.1.0-next.5Decorator
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 handler's generic must declare the same kind, 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 AnyHandlerCtor>(
constructor: AssertContextMenuRoute<Kind, TCtor>
) => voidContextMenuRoute<Kind>(
kind: Kind,
names: NamesFor<Kind>[]
): <TCtor extends AnyHandlerCtor>(
constructor: AssertContextMenuRoute<Kind, TCtor>
) => voidKind
KindKind