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::InlineKeyboardMarkup;
use crate::types::InputRichMessage;
use crate::types::LinkPreviewOptions;
use crate::types::MessageEntity;
use crate::types::MessageId;
use crate::types::ParseMode;
use crate::types::Recipient;
use crate::types::True;
use crate::types::UserId;

impl_payload! {
    /// Use this method to edit an ephemeral text or rich message. Note that it is not guaranteed that the user will receive the message edit event, especially if they are offline. On success, True is returned.
    #[derive(Debug, PartialEq, Clone, Serialize)]
    pub EditEphemeralMessageText (EditEphemeralMessageTextSetters) => True {
        required {
            /// Unique identifier for the target chat or username of the target supergroup in the format `@username`
            pub chat_id: Recipient [into],
            /// Identifier of the user who received the message
            pub receiver_user_id: UserId,
            /// Identifier of the ephemeral message to edit
            #[serde(flatten)]
            pub ephemeral_message_id: MessageId,
        }
        optional {
            /// New text of the message, 1-4096 characters after entity parsing; required if rich_message isn't specified
            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],
            /// New rich content of the message; required if text isn't specified
            pub rich_message: InputRichMessage,
            /// Link preview generation options for the message
            pub link_preview_options: LinkPreviewOptions,
            /// A JSON-serialized object for an inline keyboard
            pub reply_markup: InlineKeyboardMarkup,
        }
    }
}