# StringMenuRoute

`function` in `core` · v0.10.0

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

Routes string select menu interactions to a `StringMenuHandler`.

Pass the [`CustomId`](/docs/packages/custom-id/0.2.7/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`](/docs/packages/custom-id/0.2.7/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`.
