teloxide-core 0.13.0

Core part of the `teloxide` library - telegram bot API client
Documentation
//! Generated by `codegen_payloads`, do not edit by hand.

use serde::Serialize;

use crate::types::{GiftId, MessageEntity, ParseMode, True, UserId};

impl_payload! {
    /// Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.
    ///
    /// See also: [`SendGiftChat`](crate::payloads::SendGiftChat)
    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
    pub SendGift (SendGiftSetters) => True {
        required {
            /// Unique identifier of the target user that will receive the gift
            pub user_id: UserId,
            /// Identifier of the gift
            pub gift_id: GiftId,
        }
        optional {
            /// Pass _true_ to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
            pub pay_for_upgrade: bool,
            /// Text that will be shown along with the gift; 0-255 characters
            pub text: String [into],
            /// 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
            ///
            /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
            pub text_parse_mode: ParseMode,
            /// 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.
            pub text_entities: Vec<MessageEntity> [collect],
        }
    }
}