ronami-core 1.5.0

Core part of the `ronami` library — Telegram Bot API client
Documentation
//! Generated by `codegen_payloads`, do not edit by hand.

use serde::Serialize;

use crate::types::DraftId;
use crate::types::MessageEntity;
use crate::types::ParseMode;
use crate::types::Recipient;
use crate::types::ThreadId;
use crate::types::True;

impl_payload! {
    /// Use this method to stream a partial message to a user while the message is being generated. Returns _True_ on success.
    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
    pub SendMessageDraft (SendMessageDraftSetters) => True {
        required {
            /// Unique identifier for the target private chat
            pub chat_id: Recipient [into],
            /// Unique identifier of the message draft; must be non-zero
            pub draft_id: DraftId,
            /// Text of the message to be sent, 1-4096 characters after entities parsing
            pub text: String [into],
        }
        optional {
            /// Unique identifier for the target message thread
            pub message_thread_id: ThreadId,
            /// Mode for parsing entities in the message text. See [formatting options] for more details.
            ///
            /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
            pub parse_mode: ParseMode,
            /// A JSON-serialized list of special entities that appear in message text, which can be specified instead of _parse\_mode_
            pub entities: Vec<MessageEntity> [collect],
            /// 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.
            pub can_stop: bool,
            /// 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.
            pub keep_on_stop: bool,
        }
    }
}