ronami_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;
6use crate::types::MessageEntity;
7use crate::types::ParseMode;
8use crate::types::Recipient;
9use crate::types::True;
10
11impl_payload! {
12 /// Sends a gift to the given channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.
13 ///
14 /// See also: [`SendGift`](crate::payloads::SendGift)
15 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
16 pub SendGiftChat (SendGiftChatSetters) => True {
17 required {
18 /// Unique identifier for the chat or username of the channel that will receive the gift
19 pub chat_id: Recipient [into],
20 /// Identifier of the gift
21 pub gift_id: GiftId,
22 }
23 optional {
24 /// Pass _true_ to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
25 pub pay_for_upgrade: bool,
26 /// Text that will be shown along with the gift; 0-255 characters
27 pub text: String [into],
28 /// 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
29 ///
30 /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
31 pub text_parse_mode: ParseMode,
32 /// 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.
33 pub text_entities: Vec<MessageEntity> [collect],
34 }
35 }
36}