Skip to main content

ronami_core/payloads/
send_rich_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::InputRichMessage;
7use crate::types::Recipient;
8use crate::types::ThreadId;
9use crate::types::True;
10
11impl_payload! {
12    /// Use this method to stream a partial rich message to a user while the message is being generated. Returns _True_ on success.
13    #[derive(Debug, PartialEq, Clone, Serialize)]
14    pub SendRichMessageDraft (SendRichMessageDraftSetters) => True {
15        required {
16            /// Unique identifier for the target private chat
17            pub chat_id: Recipient [into],
18            /// Unique identifier of the message draft; must be non-zero
19            pub draft_id: DraftId,
20            /// The partial message to be streamed
21            pub rich_message: InputRichMessage,
22        }
23        optional {
24            /// Unique identifier for the target message thread
25            pub message_thread_id: ThreadId,
26            /// 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.
27            pub can_stop: bool,
28            /// 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.
29            pub keep_on_stop: bool,
30        }
31    }
32}