Functionseedcordv0.14.0Decorator
SlashRoute
Routes one or more slash commands to a SlashHandlerSlashHandler.
Pass the same route string(s) as the handler's generic. A single command reads this.optionsthis.options, several commands branch with this.matchthis.match. The decorator routes and the generic must match exactly, so listing fewer or more than the handler declares is a compile error. Subcommands use a slash path.
SlashRoute<Route>(
routes: Route[]
): <
TCtor extends new (
...args: any[]
) => InteractionHandler<Repliables>
>(
constructor: AssertSlashRoute<Route, TCtor>
) => voidSlashRoute<Route>(
routes: Route[]
): <
TCtor extends new (
...args: any[]
) => InteractionHandler<Repliables>
>(
constructor: AssertSlashRoute<Route, TCtor>
) => voidRoute
RouteRouteroutes
routes: Route[]routes: Route[]The route string(s) this handler serves, e.g. 'ban''ban', 'ban', 'kick''ban', 'kick', or 'demo/setup''demo/setup'.