# StringMenuRoute

`function` in `core` · v0.6.0

<https://docs.seedcord.org/packages/core/0.6.0/functions/string-menu-route>

Routes string select menu interactions to a `StringMenuHandler`.

Pass the [`CustomId`](/packages/custom-id/0.2.1/classes/custom-id) definition(s) this handler decodes and list the same ones in the handler's generic. The handler reads the chosen option values from `this.values`.

```ts
StringMenuRoute<Defs>(
    defs: Defs
): <TCtor extends AnyHandlerCtor>(
    constructor: AssertComponentRoute<InteractionKind.StringMenu, Defs, TCtor>
) => void
```

Routes string select menu interactions to a `StringMenuHandler`.

Pass the [`CustomId`](/packages/custom-id/0.2.1/classes/custom-id) definition(s) this handler decodes and list the same ones in the handler's generic. The handler reads the chosen option values from `this.values`.

Parameters.

- `defs` `Defs` — The customId definition(s) this handler decodes, one per route.

Returns `<TCtor extends AnyHandlerCtor>(constructor: AssertComponentRoute<InteractionKind.StringMenu, Defs, TCtor>) => void`.
