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;
6use crate::types::MessageEntity;
7use crate::types::ParseMode;
8use crate::types::Recipient;
9use crate::types::ThreadId;
10use crate::types::True;
11
12impl_payload! {
13 /// Use this method to stream a partial message to a user while the message is being generated. Returns _True_ on success.
14 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
15 pub SendMessageDraft (SendMessageDraftSetters) => True {
16 required {
17 /// Unique identifier for the target private chat
18 pub chat_id: Recipient [into],
19 /// Unique identifier of the message draft; must be non-zero
20 pub draft_id: DraftId,
21 /// Text of the message to be sent, 1-4096 characters after entities parsing
22 pub text: String [into],
23 }
24 optional {
25 /// Unique identifier for the target message thread
26 pub message_thread_id: ThreadId,
27 /// Mode for parsing entities in the message text. See [formatting options] for more details.
28 ///
29 /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
30 pub parse_mode: ParseMode,
31 /// A JSON-serialized list of special entities that appear in message text, which can be specified instead of _parse\_mode_
32 pub entities: Vec<MessageEntity> [collect],
33 /// Pass `true` to show the user a button to stop further drafts. The bot will receive an Update "stopped\_message\_generation" if the user presses the button.
34 pub can_stop: bool,
35 /// Pass `true` to keep the draft in the chat when the button is pressed. The draft will still disappear after a short time or if the bot sends a message. To fully preserve the partial draft, the bot should send it as a new message.
36 pub keep_on_stop: bool,
37 }
38 }
39}