WidgetQuery

class pyrogram.types.WidgetQuery[source]

An incoming query from a widget in a message sent by the bot or via the bot. Use answer_widget_query() to answer the query.

Parameters:
  • id (str) – Unique identifier for this query.

  • from_user (User) – Sender.

  • chat_instance (str) – Global identifier, uniquely corresponding to the chat to which the message with the widget was sent.

  • type (WidgetQueryType) – Type of the query.

  • data (str | bytes) – Data of the query, 1-64 bytes.

  • chat (Chat, optional) – Chat with the message containing the widget; None if the widget is in an inline message.

  • message_id (int, optional) – Identifier of the message containing the widget; None if the widget is in an inline message.

  • inline_message_id (str, optional) – Identifier of the inline message containing the widget.

  • chat_type (ChatType, optional) – Type of the chat to which the message with the widget was sent.

  • widget_id (str, optional) – Unique identifier of the shared widget, which sent the query; None if the widget isn’t shared.