CallbackQuery constructor

const CallbackQuery({
  1. @JsonKey(name: 'id') required String id,
  2. @JsonKey(name: 'from') required User from,
  3. @JsonKey(name: 'message') MaybeInaccessibleMessage? message,
  4. @JsonKey(name: 'inline_message_id') String? inlineMessageId,
  5. @JsonKey(name: 'chat_instance') required String chatInstance,
  6. @JsonKey(name: 'data') String? data,
  7. @JsonKey(name: 'game_short_name') String? gameShortName,
})

Creates an incoming callback query

  • id Unique identifier for this query from Sender message Message sent by the bot with the callback button that originated the query
  • inlineMessageId Identifier of the message sent via the bot in inline mode
  • chatInstance Global identifier for the chat with the callback button
  • data Data associated with the callback button
  • gameShortName Short name of a Game to be returned

Implementation

const factory CallbackQuery({
  /// Unique identifier for this query
  @JsonKey(name: 'id') required String id,

  /// Sender
  @JsonKey(name: 'from') required User from,

  /// Optional. Message sent by the bot with the callback button that
  /// originated the query
  @JsonKey(name: 'message') MaybeInaccessibleMessage? message,

  /// Optional. Identifier of the message sent via the bot in inline mode,
  /// that originated the query.
  @JsonKey(name: 'inline_message_id') String? inlineMessageId,

  /// Global identifier, uniquely corresponding to the chat to which the
  /// message with the callback button was sent. Useful for high scores in
  /// games.
  @JsonKey(name: 'chat_instance') required String chatInstance,

  /// Optional. Data associated with the callback button. Be aware that the
  /// message originated the query can contain no callback buttons with this
  /// data.
  @JsonKey(name: 'data') String? data,

  /// Optional. Short name of a Game to be returned, serves as the unique
  /// identifier for the game
  @JsonKey(name: 'game_short_name') String? gameShortName,
}) = _CallbackQuery;