teloxide_core/payloads/send_video_note.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{
6 BusinessConnectionId, EffectId, InputFile, Message, Recipient, ReplyMarkup, ReplyParameters,
7 ThreadId,
8};
9
10impl_payload! {
11 @[multipart = video_note, thumbnail]
12 /// As of [v.4.0], Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent [`Message`] is returned.
13 ///
14 /// [v.4.0]: https://core.telegram.org/bots/api#document
15 /// [`Message`]: crate::types::Message
16 #[derive(Debug, Clone, Serialize)]
17 pub SendVideoNote (SendVideoNoteSetters) => Message {
18 required {
19 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
20 pub chat_id: Recipient [into],
21 /// Video note to send. Pass a file_id as FileId to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. [More info on Sending Files »]. Sending video notes by a URL is currently unsupported
22 ///
23 /// [More info on Sending Files »]: crate::types::InputFile
24 pub video_note: InputFile,
25 }
26 optional {
27 /// Unique identifier of the business connection on behalf of which the message will be sent
28 pub business_connection_id: BusinessConnectionId,
29 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
30 pub message_thread_id: ThreadId,
31 /// Duration of the video in seconds
32 pub duration: u32,
33 /// Video width and height, i.e. diameter of the video message
34 pub length: u32,
35 /// 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 »]
36 ///
37 /// [More info on Sending Files »]: crate::types::InputFile
38 pub thumbnail: InputFile,
39 /// Sends the message [silently]. Users will receive a notification with no sound.
40 ///
41 /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
42 pub disable_notification: bool,
43 /// Protects the contents of sent messages from forwarding and saving
44 pub protect_content: bool,
45 /// 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
46 pub allow_paid_broadcast: bool,
47 /// Unique identifier of the message effect to be added to the message; for private chats only
48 pub message_effect_id: EffectId,
49 /// Description of the message to reply to
50 pub reply_parameters: ReplyParameters,
51 /// 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.
52 ///
53 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
54 /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
55 pub reply_markup: ReplyMarkup [into],
56 }
57 }
58}