teloxide_core/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 allow a bot to stream a message draft to a user while it's being generated, before the final message is sent. 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: i64,
16 }
17 optional {
18 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
19 pub message_thread_id: ThreadId,
20 /// Text of the message to be sent, 1-4096 characters after entities parsing
21 pub text: String [into],
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 /// Pass True to show the user a button to stop further drafts
29 pub can_stop: bool,
30 /// Pass True to keep the draft in the chat when the button is pressed
31 pub keep_on_stop: bool,
32 }
33 }
34}