teloxide_core/payloads/
send_gift_chat.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{GiftId, MessageEntity, ParseMode, Recipient, True};
6
7impl_payload! {
8    /// Sends a gift to the given channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.
9    ///
10    /// See also: [`SendGift`](crate::payloads::SendGift)
11    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
12    pub SendGiftChat (SendGiftChatSetters) => True {
13        required {
14            /// Unique identifier for the chat or username of the channel that will receive the gift
15            pub chat_id: Recipient [into],
16            /// Identifier of the gift
17            pub gift_id: GiftId,
18        }
19        optional {
20            /// Pass _true_ to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
21            pub pay_for_upgrade: bool,
22            /// Text that will be shown along with the gift; 0-255 characters
23            pub text: String [into],
24            /// Mode for parsing entities in the text. See [formatting options] for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored
25            ///
26            /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
27            pub text_parse_mode: ParseMode,
28            /// List of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
29            pub text_entities: Vec<MessageEntity> [collect],
30        }
31    }
32}