teloxide_core/payloads/edit_message_media_inline.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{BusinessConnectionId, InlineKeyboardMarkup, InputMedia, True};
6
7impl_payload! {
8 /// Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL. On success, _True_ 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.
9 ///
10 /// See also: [`EditMessageMedia`](crate::payloads::EditMessageMedia)
11 #[derive(Debug, Clone, Serialize)]
12 pub EditMessageMediaInline (EditMessageMediaInlineSetters) => True {
13 required {
14 /// Identifier of the inline message
15 pub inline_message_id: String [into],
16 /// A JSON-serialized object for a new media content of the message
17 pub media: InputMedia,
18 }
19 optional {
20 /// Unique identifier of the business connection on behalf of which the message to be edited was sent
21 pub business_connection_id: BusinessConnectionId,
22 /// A JSON-serialized object for an [inline keyboard].
23 ///
24 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
25 pub reply_markup: InlineKeyboardMarkup,
26 }
27 }
28}