interface CommandInteractionOption

export interface CommandInteractionOption<Cached extends CacheType = CacheType>

Represents an option of a received command interaction.

Type Parameters

optional
Cached? extends CacheType = CacheType

optional
attachment? : Attachment

The resolved attachment

optional
autocomplete? : boolean

Whether the autocomplete interaction is enabled for a ApplicationCommandOptionType.String, ApplicationCommandOptionType.Integer or ApplicationCommandOptionType.Number option

The resolved channel

optional
focused? : boolean

The resolved member

optional
message? : Message<BooleanCache<Cached>>

name : string

The name of the option

optional
options? : readonly CommandInteractionOption[]

Additional options if this option is a subcommand (group)

optional
role? : CacheTypeReducer<Cached, Role, APIRole>

The resolved role

The type of the option

optional
user? : User

The resolved user

optional
value? : string | number | boolean

The value of the option