Typegatewayv0.6.0
SlashOptions
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.
type SlashOptions<
Route extends keyof SlashRegistry,
Cache extends CacheType = CacheFor<Route>
> = SlashOptions<Route, GatewayLens<Cache>>;Route
A route key from the generated SlashRegistry.
Route extends keyof SlashRegistryCache
The interaction cache state. The command's contexts set it.
Cache extends CacheType = CacheFor<Route>