Skip to main content

teloxide_core_ng/payloads/
send_message_draft.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{ChatId, MessageEntity, ParseMode, ThreadId, True};
6
7impl_payload! {
8    /// Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. 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: ChatId [into],
14            /// Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated
15            pub draft_id: u32,
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            /// 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}