teloxide-core 0.13.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::{
    BusinessConnectionId, InlineKeyboardMarkup, LinkPreviewOptions, Message, MessageEntity,
    MessageId, ParseMode, Recipient,
};

impl_payload! {
    /// Use this method to edit text and [games] messages. On success, the edited Message is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.
    ///
    /// See also: [`EditMessageTextInline`](crate::payloads::EditMessageTextInline)
    ///
    /// [games]: https://core.telegram.org/bots/api#games
    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
    pub EditMessageText (EditMessageTextSetters) => Message {
        required {
            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`).
            pub chat_id: Recipient [into],
            /// Identifier of the message to edit
            #[serde(flatten)]
            pub message_id: MessageId,
            /// New text of the message, 1-4096 characters after entities parsing
            pub text: String [into],
        }
        optional {
            /// Unique identifier of the business connection on behalf of which the message to be edited was sent
            pub business_connection_id: BusinessConnectionId,
            /// 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,
            /// List of special entities that appear in message text, which can be specified instead of _parse\_mode_
            pub entities: Vec<MessageEntity> [collect],
            /// Link preview generation options for the message
            pub link_preview_options: LinkPreviewOptions,
            /// A JSON-serialized object for an [inline keyboard].
            ///
            /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
            pub reply_markup: InlineKeyboardMarkup,
        }
    }
}