Typehttpv0.1.0-next.0
SlashOptions
The typed view over a chat-input command's options for one route on the HTTP transport. Each getter restricts its namename to that route's options of the matching kind, drops the null on required options, narrows choiceschoices to their literal union, and only appears when the route has an option of that kind. The rich kinds return discord-api-typesdiscord-api-types payloads resolved from the interaction's resolvedresolved data.
A channel option declared with addChannelTypesaddChannelTypes narrows getChannelgetChannel to the matching resolved-channel subtype.
type SlashOptions<Route extends keyof SlashOptionRegistry> = SlashOptions<
Route,
HttpLens
>;type SlashOptions<Route extends keyof SlashOptionRegistry> = SlashOptions<
Route,
HttpLens
>;Route
A route key from the generated SlashOptionRegistrySlashOptionRegistry.
Route extends keyof SlashOptionRegistryRoute extends keyof SlashOptionRegistry