Skip to main content

ronami_core/payloads/
send_sticker.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::Recipient;
11use crate::types::ReplyMarkup;
12use crate::types::ReplyParameters;
13use crate::types::SuggestedPostParameters;
14use crate::types::ThreadId;
15use crate::types::TopicId;
16
17impl_payload! {
18    @[multipart = sticker]
19    /// Use this method to send static .WEBP, .TGS or .WEBM stickers. On success, the sent Message is returned.
20    ///
21    /// [animated]: https://telegram.org/blog/animated-stickers
22    #[derive(Debug, Clone, Serialize)]
23    pub SendSticker (SendStickerSetters) => Message {
24        required {
25            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`).
26            pub chat_id: Recipient [into],
27            /// Sticker to send. Pass a file_id as FileId to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. [More info on Sending Files »]
28            ///
29            /// [More info on Sending Files »]: crate::types::InputFile
30            pub sticker: InputFile,
31        }
32        optional {
33            /// Unique identifier of the business connection on behalf of which the message will be sent
34            pub business_connection_id: BusinessConnectionId,
35            /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
36            pub message_thread_id: ThreadId,
37            /// Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
38            pub direct_messages_topic_id: TopicId,
39            /// Emoji associated with the sticker; only for just uploaded stickers
40            pub emoji: String [into],
41            /// Sends the message [silently]. Users will receive a notification with no sound.
42            ///
43            /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
44            pub disable_notification: bool,
45            /// Protects the contents of sent messages from forwarding and saving
46            pub protect_content: bool,
47            /// 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
48            pub allow_paid_broadcast: bool,
49            /// Unique identifier of the message effect to be added to the message; for private chats only
50            pub message_effect_id: EffectId,
51            /// 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.
52            pub suggested_post_parameters: SuggestedPostParameters,
53            /// A JSON-serialized object containing the parameters of the ephemeral message to send
54            pub ephemeral_message_parameters: EphemeralMessageParameters,
55            /// Description of the message to reply to
56            pub reply_parameters: ReplyParameters,
57            /// 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.
58            ///
59            /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
60            /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
61            pub reply_markup: ReplyMarkup [into],
62        }
63    }
64}