Typeseedcordv0.14.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 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 exactly what the djs resolver returns.
Pass the raw this.event.optionsthis.event.options resolver for anything this view does not cover, such as narrowing a channel option with getChannel(name, channelTypes)getChannel(name, channelTypes).
type SlashOptions<
Route extends keyof SlashOptionRegistry,
Cache extends CacheType = "cached"
> = Getter<Route, Cache, "string", "getString"> &
Getter<Route, Cache, "integer", "getInteger"> &
Getter<Route, Cache, "number", "getNumber"> &
Getter<Route, Cache, "boolean", "getBoolean"> &
Getter<Route, Cache, "user", "getUser"> &
Getter<Route, Cache, "channel", "getChannel"> &
Getter<Route, Cache, "role", "getRole"> &
Getter<Route, Cache, "mentionable", "getMentionable"> &
Getter<Route, Cache, "attachment", "getAttachment"> &
MemberGetter<Route, Cache>;type SlashOptions<
Route extends keyof SlashOptionRegistry,
Cache extends CacheType = "cached"
> = Getter<Route, Cache, "string", "getString"> &
Getter<Route, Cache, "integer", "getInteger"> &
Getter<Route, Cache, "number", "getNumber"> &
Getter<Route, Cache, "boolean", "getBoolean"> &
Getter<Route, Cache, "user", "getUser"> &
Getter<Route, Cache, "channel", "getChannel"> &
Getter<Route, Cache, "role", "getRole"> &
Getter<Route, Cache, "mentionable", "getMentionable"> &
Getter<Route, Cache, "attachment", "getAttachment"> &
MemberGetter<Route, Cache>;Route
A route key from the generated SlashOptionRegistrySlashOptionRegistry.
Route extends keyof SlashOptionRegistryRoute extends keyof SlashOptionRegistryCache
The interaction cache state, 'cached''cached' by default.