UpdateBotCallbackQuery

class pyrogram.raw.types.UpdateBotCallbackQuery

A callback button was pressed, and the button data was sent to the bot that created the button

Constructor of Update.

Details:
  • Layer: 223

  • ID: B9CFC48D

Parameters:
  • query_id (int 64-bit) – Query ID

  • user_id (int 64-bit) – ID of the user that pressed the button

  • peer (Peer) – Chat where the inline keyboard was sent

  • msg_id (int 32-bit) – Message ID

  • chat_instance (int 64-bit) – Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.

  • data (bytes, optional) – Callback data

  • game_short_name (str, optional) – Short name of a Game to be returned, serves as the unique identifier for the game

TL Schema

updateBotCallbackQuery#b9cfc48d
flags:#
query_id:long
user_id:long
peer:Peer
msg_id:int
chat_instance:long
data:flags.0?bytes
game_short_name:flags.1?string

= Update

Parameter Tree

UpdateBotCallbackQuery
├── query_idlong
├── user_idlong
├── peerPeer
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── msg_idint
├── chat_instancelong
├── databytes (optional)
└── game_short_namestring (optional)

Example

UpdateBotCallbackQuery(
    query_id=0,
    user_id=0,
    peer=PeerUser(user_id=0),
    msg_id=0,
    chat_instance=0,
)