ApplicationCommandInteractionDataOption class

Application Command Interaction Data Option structure

All options have names, and an option can either be a parameter and input value--in which case value will be set--or it can denote a subcommand or group--in which case it will contain a top-level key and another array of options.

value and options are mutually exclusive.

https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

ApplicationCommandInteractionDataOption({required String name, required ApplicationCommandOptionType type, dynamic value, List<ApplicationCommandInteractionDataOption>? options, bool? focused})
Constructor
ApplicationCommandInteractionDataOption.fromJson(Map<String, dynamic> json)
From json
factory

Properties

focused bool?
true if this option is the currently focused option for autocomplete
final
hashCode int
The hash code for this object.
no setterinherited
name String
the name of the parameter
final
options List<ApplicationCommandInteractionDataOption>?
present if this option is a group or subcommand
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ApplicationCommandOptionType
value of application command option type
final
value → dynamic
the value of the pair
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
To json
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited