teloxide_core/payloads/edit_message_text.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{
6 BusinessConnectionId, InlineKeyboardMarkup, InputRichMessage, LinkPreviewOptions, Message,
7 MessageEntity, MessageId, ParseMode, Recipient,
8};
9
10impl_payload! {
11 @[multipart = rich_message]
12 /// 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.
13 ///
14 /// See also: [`EditMessageTextInline`](crate::payloads::EditMessageTextInline)
15 ///
16 /// [games]: https://core.telegram.org/bots/api#games
17 #[derive(Debug, Clone, Serialize)]
18 pub EditMessageText (EditMessageTextSetters) => Message {
19 required {
20 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`).
21 pub chat_id: Recipient [into],
22 /// Identifier of the message to edit
23 #[serde(flatten)]
24 pub message_id: MessageId,
25 }
26 optional {
27 /// New text of the message, 1-4096 characters after entities parsing; required if `rich_message` isn't specified
28 pub text: String [into],
29 /// New rich content of the message; required if `text` isn't specified
30 pub rich_message: InputRichMessage,
31 /// Unique identifier of the business connection on behalf of which the message to be edited was sent
32 pub business_connection_id: BusinessConnectionId,
33 /// Mode for parsing entities in the message text. See [formatting options] for more details.
34 ///
35 /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
36 pub parse_mode: ParseMode,
37 /// List of special entities that appear in message text, which can be specified instead of _parse\_mode_
38 pub entities: Vec<MessageEntity> [collect],
39 /// Link preview generation options for the message
40 pub link_preview_options: LinkPreviewOptions,
41 /// A JSON-serialized object for an [inline keyboard].
42 ///
43 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
44 pub reply_markup: InlineKeyboardMarkup,
45 }
46 }
47}