InteractionResponse class

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

InteractionResponse({required InteractionCallbackType type, InteractionCallbackData? data})
Constructor
InteractionResponse.autocomplete(List<ApplicationCommandOptionChoice> choices)
Convenience method to create an InteractionResponse with autocomplete choices
InteractionResponse.fromJson(Map<String, dynamic> json)
From json
factory
InteractionResponse.message({InteractionCallbackType type = InteractionCallbackType.channelMessageWithSource, bool? tts, String? content, List<Embed>? embeds, AllowedMentions? allowedMentions, List<MessageFlag>? flags, List<Component>? components, List<Attachment>? attachments})
Convenience method to create an InteractionResponse with message data
InteractionResponse.pong()
Convenience constructor to create a pong resopnse

Properties

data InteractionCallbackData?
an optional response message
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type InteractionCallbackType
the type of response
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