ronami_core/payloads/send_video.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::Seconds;
16use crate::types::SuggestedPostParameters;
17use crate::types::ThreadId;
18use crate::types::TopicId;
19
20impl_payload! {
21 @[multipart = video, thumbnail, cover]
22 /// Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as [`Document`]). On success, the sent [`Message`] is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
23 ///
24 /// [`Document`]: crate::types::Document
25 /// [`Message`]: crate::types::Message
26 #[derive(Debug, Clone, Serialize)]
27 pub SendVideo (SendVideoSetters) => Message {
28 required {
29 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
30 pub chat_id: Recipient [into],
31 /// Video to send. Pass a file_id as FileId to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. [More info on Sending Files »]
32 ///
33 /// [More info on Sending Files »]: crate::types::InputFile
34 pub video: InputFile,
35 }
36 optional {
37 /// Unique identifier of the business connection on behalf of which the message will be sent
38 pub business_connection_id: BusinessConnectionId,
39 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
40 pub message_thread_id: ThreadId,
41 /// Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
42 pub direct_messages_topic_id: TopicId,
43 /// Duration of the video in seconds
44 pub duration: u32,
45 /// Video width
46 pub width: u32,
47 /// Video height
48 pub height: u32,
49 /// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. [More info on Sending Files »]
50 ///
51 /// [More info on Sending Files »]: crate::types::InputFile
52 pub thumbnail: InputFile,
53 /// Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. [More information on Sending Files »]
54 ///
55 /// [More information on Sending Files »]: https://core.telegram.org/bots/api#sending-files
56 pub cover: InputFile,
57 /// Start timestamp for the video in the message
58 pub start_timestamp: Seconds,
59 /// Video caption (may also be used when resending videos by _file\_id_), 0-1024 characters after entities parsing
60 pub caption: String [into],
61 /// Mode for parsing entities in the video caption. See [formatting options] for more details.
62 ///
63 /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
64 pub parse_mode: ParseMode,
65 /// List of special entities that appear in the caption, which can be specified instead of _parse\_mode_
66 pub caption_entities: Vec<MessageEntity> [collect],
67 /// Pass True, if the caption must be shown above the message media
68 pub show_caption_above_media: bool,
69 /// Pass True if the video needs to be covered with a spoiler animation
70 pub has_spoiler: bool,
71 /// Pass _True_, if the uploaded video is suitable for streaming
72 pub supports_streaming: bool,
73 /// Sends the message [silently]. Users will receive a notification with no sound.
74 ///
75 /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
76 pub disable_notification: bool,
77 /// Protects the contents of sent messages from forwarding and saving
78 pub protect_content: bool,
79 /// 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
80 pub allow_paid_broadcast: bool,
81 /// Unique identifier of the message effect to be added to the message; for private chats only
82 pub message_effect_id: EffectId,
83 /// An 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.
84 pub suggested_post_parameters: SuggestedPostParameters,
85 /// A JSON-serialized object containing the parameters of the ephemeral message to send
86 pub ephemeral_message_parameters: EphemeralMessageParameters,
87 /// Description of the message to reply to
88 pub reply_parameters: ReplyParameters,
89 /// 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. Not supported for messages sent on behalf of a business account.
90 ///
91 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
92 /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
93 pub reply_markup: ReplyMarkup [into],
94 }
95 }
96}