# SlashRoute

`function` in `seedcord` · v0.11.0

<https://docs.seedcord.org/packages/seedcord/0.11.0/functions/slash-route>

Routes slash commands to handler classes

Supports single commands, subcommands, and subcommand groups. Use forward slashes to separate subcommand paths.

```ts
SlashRoute(
    routeOrRoutes: string | string[]
): <
    TCtor extends new (
        ...args: any[]
    ) => InteractionHandler<Repliables>
>(
    constructor: AssertHandles<ChatInputCommandInteraction, TCtor>
) => void
```

Routes slash commands to handler classes

Supports single commands, subcommands, and subcommand groups. Use forward slashes to separate subcommand paths.

Parameters.

- `routeOrRoutes` `string | string[]` — Command path(s) to handle

Returns `<TCtor extends new (...args: any[]) => InteractionHandler<Repliables>>(constructor: AssertHandles<ChatInputCommandInteraction, TCtor>) => void`.
