ApplicationCommandOption class

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

ApplicationCommandOption({required ApplicationCommandOptionType type, required String name, required String description, bool? required, List<ApplicationCommandOptionChoice>? choices, List<ApplicationCommandOption>? options, List<ChannelType>? channelTypes, num? minValue, num? maxValue, bool? autocomplete})
Constructor
ApplicationCommandOption.fromJson(Map<String, dynamic> json)
From json
factory

Properties

autocomplete bool?
enable autocomplete interactions for this option
final
channelTypes List<ChannelType>?
if the option is a channel type, the channels shown will be restricted to these types
final
choices List<ApplicationCommandOptionChoice>?
choices for STRING, INTEGER, and NUMBER types for the user to pick from, max 25
final
description String
1-100 character description
final
hashCode int
The hash code for this object.
no setterinherited
maxValue num?
if the option is an INTEGER or NUMBER type, the maximum value permitted
final
minValue num?
if the option is an INTEGER or NUMBER type, the minimum value permitted
final
name String
1-32 character name
final
options List<ApplicationCommandOption>?
if the option is a subcommand or subcommand group type, these nested options will be the parameters
final
required bool?
if the parameter is required or optional
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ApplicationCommandOptionType
the type of option
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