# SlashOptions

`type` in `gateway` · v0.1.0-next.3

<https://docs.seedcord.org/packages/gateway/0.1.0-next.3/types/slash-options>

The typed view over a chat-input command's options for one route. Each getter mirrors the discord.js resolver method but restricts its `name` to that route's options of the matching kind, drops the null on required options, narrows `choices` to their literal union, and only appears when the route has an option of that kind. The rich kinds return exactly what the djs resolver returns.

A channel option declared with `addChannelTypes` narrows `getChannel` to the matching channel subtype. Pass the raw `this.event.options` resolver for anything this view does not cover.

## Declaration

```ts
type SlashOptions<
    Route extends keyof SlashOptionRegistry,
    Cache extends CacheType = "cached"
> = SlashOptions<Route, GatewayLens<Cache>>;
```
