Skip to main content

ronami_core/payloads/
send_message_draft.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{DraftId, MessageEntity, ParseMode, Recipient, ThreadId, True};
6
7impl_payload! {
8    /// Use this method to stream a partial message to a user while the message is being generated. Returns _True_ on success.
9    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
10    pub SendMessageDraft (SendMessageDraftSetters) => True {
11        required {
12            /// Unique identifier for the target private chat
13            pub chat_id: Recipient [into],
14            /// Unique identifier of the message draft; must be non-zero
15            pub draft_id: DraftId,
16            /// Text of the message to be sent, 1-4096 characters after entities parsing
17            pub text: String [into],
18        }
19        optional {
20            /// Unique identifier for the target message thread
21            pub message_thread_id: ThreadId,
22            /// Mode for parsing entities in the message text. See [formatting options] for more details.
23            ///
24            /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
25            pub parse_mode: ParseMode,
26            /// A JSON-serialized list of special entities that appear in message text, which can be specified instead of _parse\_mode_
27            pub entities: Vec<MessageEntity> [collect],
28        }
29    }
30}