CallbackQuery class

This object represents an incoming callback query from a callback button in an inline keyboard.

If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.

NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).

https://core.telegram.org/bots/api#callbackquery

Implementers
Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake)

Constructors

CallbackQuery({required String id, required User from, Message? message, String? inlineMessageId, String? chatInstance, String? data, String? gameShortName})
CallbackQuery.fromJson(Map<String, dynamic> json)
factory

Properties

chatInstance String?
getter/setter pair
data String?
getter/setter pair
from User
getter/setter pair
gameShortName String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
getter/setter pair
inlineMessageId String?
getter/setter pair
message Message?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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