# SelectMenuRoute

`function` in `seedcord` · v0.13.0

<https://docs.seedcord.org/packages/seedcord/0.13.0/functions/select-menu-route>

Routes select menu interactions to handler classes.

Pass the select kind and the [`CustomId`](/packages/kit/0.2.0/classes/custom-id) definition(s) this handler decodes. The handler's generic must list the same definitions, and its second generic argument must be the matching select interaction type, or it is a compile error.

```ts
SelectMenuRoute<SelectMenu, Defs>(
    type: SelectMenu,
    defs: Defs
): <
    TCtor extends new (
        ...args: any[]
    ) => InteractionHandler<Repliables> & HasComponentDefs<Defs>
>(
    constructor: AssertHandles<SelectMenuInteractionFor<SelectMenu>, TCtor>
) => void
```

Routes select menu interactions to handler classes.

Pass the select kind and the [`CustomId`](/packages/kit/0.2.0/classes/custom-id) definition(s) this handler decodes. The handler's generic must list the same definitions, and its second generic argument must be the matching select interaction type, or it is a compile error.

Parameters.

- `type` `SelectMenu` — Select menu kind from [`SelectMenuKind`](/packages/seedcord/0.13.0/enums/select-menu-kind).
- `defs` `Defs` — The customId definition(s) this handler decodes, one per route.

Returns `<TCtor extends new (...args: any[]) => InteractionHandler<Repliables> & HasComponentDefs<Defs>>(constructor: AssertHandles<SelectMenuInteractionFor<SelectMenu>, TCtor>) => void`.
