# SlashOptions

`type` in `gateway` · v0.7.5

<https://seedcord.org/docs/packages/gateway/0.7.5/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 SlashRegistry,
    Cache extends CacheType = CacheFor<Route>
> = SlashOptions<Route, GatewayLens<Cache>>;
```
