Skip to main content

ronami_core/payloads/
stop_poll.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::InlineKeyboardMarkup;
7use crate::types::MessageId;
8use crate::types::Poll;
9use crate::types::Recipient;
10
11impl_payload! {
12    /// Use this method to stop a poll which was sent by the bot. On success, the stopped Poll with the final results is returned.
13    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
14    pub StopPoll (StopPollSetters) => Poll {
15        required {
16            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`).
17            pub chat_id: Recipient [into],
18            /// Identifier of the message to edit
19            #[serde(flatten)]
20            pub message_id: MessageId,
21        }
22        optional {
23            /// Unique identifier of the business connection on behalf of which the message to be edited was sent
24            pub business_connection_id: BusinessConnectionId,
25            /// A JSON-serialized object for an [inline keyboard].
26            ///
27            /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
28            pub reply_markup: InlineKeyboardMarkup,
29        }
30    }
31}