teloxide_core/payloads/
stop_poll.rs

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