ronami_core/payloads/send_chat_action.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::ChatAction;
7use crate::types::Recipient;
8use crate::types::ThreadId;
9use crate::types::True;
10
11impl_payload! {
12 /// Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
13 ///
14 /// > Example: The [ImageBot] needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.
15 ///
16 /// We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.
17 ///
18 /// [ImageBot]: https://t.me/imagebot
19 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
20 pub SendChatAction (SendChatActionSetters) => True {
21 required {
22 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
23 pub chat_id: Recipient [into],
24 /// Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for [text messages], upload_photo for [photos], record_video or upload_video for [videos], record_audio or upload_audio for [audio files], upload_document for [general files], choose_sticker for [stickers], find_location for [location data], record_video_note or upload_video_note for [video notes].
25 ///
26 /// [text messages]: crate::payloads::SendMessage
27 /// [photos]: crate::payloads::SendPhoto
28 /// [videos]: crate::payloads::SendVideo
29 /// [audio files]: crate::payloads::SendAudio
30 /// [general files]: crate::payloads::SendDocument
31 /// [stickers]: crate::payloads::SendSticker
32 /// [location data]: crate::payloads::SendLocation
33 /// [video notes]: crate::payloads::SendVideoNote
34 pub action: ChatAction,
35 }
36 optional {
37 /// Unique identifier of the business connection on behalf of which the action will be sent
38 pub business_connection_id: BusinessConnectionId,
39 /// Unique identifier for the target message thread; supergroups only
40 pub message_thread_id: ThreadId,
41 }
42 }
43}