Skip to main content

teloxide_core/payloads/
answer_widget_query.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{True, WidgetQueryId};
6
7impl_payload! {
8    /// Use this method to 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 [`EditMessageWidgetData`] or [`EditSharedWidgetData`] to change it. On success, *True* is returned.
9    ///
10    /// [`EditMessageWidgetData`]: crate::payloads::EditMessageWidgetData
11    /// [`EditSharedWidgetData`]: crate::payloads::EditSharedWidgetData
12    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
13    pub AnswerWidgetQuery (AnswerWidgetQuerySetters) => True {
14        required {
15            /// Unique identifier for the query to be answered
16            pub widget_query_id: WidgetQueryId,
17        }
18        optional {
19            /// Data to be returned to the widget, 0-1024 bytes
20            pub data: String [into],
21        }
22    }
23}