WidgetQuery
This object represents an incoming query from a widget in a message sent by the bot or via the bot. Use answerWidgetQuery to answer the query. Each user can send at most 5 queries per 5 seconds to the bot from all its widgets.
Properties
id
id: string;Unique identifier for this query
from
from: User;Sender
chat
chat?: Chat;Chat with the message containing the widget; omitted if the widget is in an inline message
message_id
message_id?: number;Identifier of the message containing the widget; omitted if the widget is in an inline message
inline_message_id
inline_message_id?: string;Identifier of the inline message containing the widget
chat_instance
chat_instance: string;Global identifier, uniquely corresponding to the chat to which the message with the widget was sent
chat_type
chat_type?: "sender" | Chat["type"];For widgets in inline messages, type of the chat to which the message was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”.
type
type: WidgetQueryType;Type of the query
data
data: string;Data of the query, 1-64 bytes
widget_id
widget_id?: string;Unique identifier of the shared widget, which sent the query; omitted if the widget isn’t shared