ApplicationCommandOptionChoice class

Application Command Option Choice structure

If you specify choices for an option, they are the only valid values for a user to pick

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

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

ApplicationCommandOptionChoice({required String name, required dynamic value})
Create an ApplicationCommandOptionChoice
ApplicationCommandOptionChoice.fromJson(Map<String, dynamic> json)
From json
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
1-100 character choice name
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → dynamic
value of the choice, up to 100 characters if string
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