MessageInteraction class

Message Interaction structure

This is sent on the message object when the message is a response to an Interaction without an existing message.

This means responses to Message Components do not include this property, instead including a message reference object as components always exist on preexisting messages.

https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object-message-interaction-structure

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

MessageInteraction({required String id, required InteractionType type, required String name, required User user})
Constructor
MessageInteraction.fromJson(Map<String, dynamic> json)
From json
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
the id of the interaction
final
name String
the name of the application command
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type InteractionType
the type of interaction
final
user User
the user who invoked the interaction
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