1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
// This file is auto generated by [`cg`] from [`schema`].
//
// **DO NOT EDIT THIS FILE**,
//
// Edit `cg` or `schema` instead.
//
// [cg]: https://github.com/teloxide/cg
// [`schema`]: https://github.com/WaffleLapkin/tg-methods-schema
use serde::Serialize;
use crate::types::{InlineKeyboardMarkup, Message, MessageEntity, ParseMode, Recipient};
impl_payload! {
/// Use this method to edit captions of messages. On success, the edited Message is returned.
///
/// See also: [`EditMessageCaptionInline`](crate::payloads::EditMessageCaptionInline)
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
pub EditMessageCaption (EditMessageCaptionSetters) => 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
pub message_id: i32,
}
optional {
/// New caption of the message, 0-1024 characters after entities parsing
pub caption: 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,
/// List of special entities that appear in the caption, which can be specified instead of _parse\_mode_
pub caption_entities: Vec<MessageEntity> [collect],
/// 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,
}
}
}
