answer_widget_query()¶
- async Client.answer_widget_query()¶
Send an answer to a query from a widget. The query must be answered within 15 seconds. The answer is received only by the widget that sent the query and doesn’t change data of the widget; use
edit_message_widget_data()oredit_shared_widget_data()to change it.Usable by Users Bots- Parameters:
widget_query_id (
str) – Unique identifier for the query to be answered.data (
str, optional) – Data to be returned to the widget, 0-1024 bytes.
- Returns:
bool– True on success.
Example
@app.on_widget_query() async def answer(client, widget_query): await client.answer_widget_query(widget_query.id, "ok")