# ModalRoute

`function` in `seedcord` · v0.11.0

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

Routes modal submissions to handler classes

Matches the customId prefix before the first colon.

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

Routes modal submissions to handler classes

Matches the customId prefix before the first colon.

Parameters.

- `routeOrRoutes` `string | string[]` — CustomId prefix(es) to handle

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