teloxide-fork-core 0.14.0

Core part of the `teloxide` library - telegram bot API client
Documentation
//! Generated by `codegen_payloads`, do not edit by hand.

use serde::Serialize;

use crate::types::{ChatId, MessageEntity, ParseMode, ThreadId, True};

impl_payload! {
    /// 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.
    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
    pub SendMessageDraft (SendMessageDraftSetters) => True {
        required {
            /// Unique identifier for the target private chat
            pub chat_id: ChatId [into],
            /// Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated
            pub draft_id: i64,
        }
        optional {
            /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
            pub message_thread_id: ThreadId,
            /// Text of the message to be sent, 1-4096 characters after entities parsing
            pub text: String [into],
            /// 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
            pub can_stop: bool,
            /// Pass True to keep the draft in the chat when the button is pressed
            pub keep_on_stop: bool,
        }
    }
}