Skip to main content

ronami_core/payloads/
send_live_photo.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::EffectId;
7use crate::types::EphemeralMessageParameters;
8use crate::types::InputFile;
9use crate::types::Message;
10use crate::types::MessageEntity;
11use crate::types::ParseMode;
12use crate::types::Recipient;
13use crate::types::ReplyMarkup;
14use crate::types::ReplyParameters;
15use crate::types::SuggestedPostParameters;
16use crate::types::ThreadId;
17use crate::types::TopicId;
18
19impl_payload! {
20    @[multipart = live_photo, photo]
21    /// Use this method to send live photos. On success, the sent [`Message`] is returned.
22    ///
23    /// [`Message`]: crate::types::Message
24    #[derive(Debug, Clone, Serialize)]
25    pub SendLivePhoto (SendLivePhotoSetters) => Message {
26        required {
27            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
28            pub chat_id: Recipient [into],
29            /// Live photo video to send. The video must be no longer than 10 seconds and must not exceed 10 MB in size. Pass a file_id as FileId to send a video that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. [More info on Sending Files »]. Sending live photos by a URL is currently unsupported.
30            ///
31            /// [More info on Sending Files »]: crate::types::InputFile
32            pub live_photo: InputFile,
33            /// The static photo to send. Pass a file_id as FileId to send a photo that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. [More info on Sending Files »]. Sending live photos by a URL is currently unsupported.
34            ///
35            /// [More info on Sending Files »]: crate::types::InputFile
36            pub photo: InputFile,
37        }
38        optional {
39            /// Unique identifier of the business connection on behalf of which the message will be sent
40            pub business_connection_id: BusinessConnectionId,
41            /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups and private chats of bots with forum topic mode enabled only
42            pub message_thread_id: ThreadId,
43            /// Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
44            pub direct_messages_topic_id: TopicId,
45            /// Video caption (may also be used when resending videos by _file\_id_), 0-1024 characters after entities parsing
46            pub caption: String [into],
47            /// Mode for parsing entities in the video caption. See [formatting options] for more details.
48            ///
49            /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
50            pub parse_mode: ParseMode,
51            /// A JSON-serialized list of special entities that appear in the caption, which can be specified instead of _parse\\_mode_
52            pub caption_entities: Vec<MessageEntity> [collect],
53            /// Pass _True_ if the caption must be shown above the message media
54            pub show_caption_above_media: bool,
55            /// Pass _True_ if the video needs to be covered with a spoiler animation
56            pub has_spoiler: bool,
57            /// Sends the message [silently]. Users will receive a notification with no sound.
58            ///
59            /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
60            pub disable_notification: bool,
61            /// Protects the contents of sent messages from forwarding and saving
62            pub protect_content: bool,
63            /// Pass `true` to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
64            pub allow_paid_broadcast: bool,
65            /// Unique identifier of the message effect to be added to the message; for private chats only
66            pub message_effect_id: EffectId,
67            /// A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
68            pub suggested_post_parameters: SuggestedPostParameters,
69            /// A JSON-serialized object containing the parameters of the ephemeral message to send
70            pub ephemeral_message_parameters: EphemeralMessageParameters,
71            /// Description of the message to reply to
72            pub reply_parameters: ReplyParameters,
73            /// Additional interface options. A JSON-serialized object for an [inline keyboard], [custom reply keyboard], instructions to remove a reply keyboard or to force a reply from the user.
74            ///
75            /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
76            /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
77            pub reply_markup: ReplyMarkup [into],
78        }
79    }
80}