pub struct Gift {Show 17 fields
pub id: i64,
pub publisher_chat_id: i64,
pub sticker: Sticker,
pub star_count: i64,
pub default_sell_star_count: i64,
pub upgrade_star_count: i64,
pub upgrade_variant_count: i32,
pub has_colors: bool,
pub is_for_birthday: bool,
pub is_premium: bool,
pub auction_info: Option<GiftAuction>,
pub next_send_date: i32,
pub user_limits: Option<GiftPurchaseLimits>,
pub overall_limits: Option<GiftPurchaseLimits>,
pub background: GiftBackground,
pub first_send_date: i32,
pub last_send_date: i32,
}Expand description
Describes a gift that can be sent to another user or channel chat
Fields§
§id: i64Unique identifier of the gift
publisher_chat_id: i64Identifier of the chat that published the gift; 0 if none
sticker: StickerThe sticker representing the gift
star_count: i64Number of Telegram Stars that must be paid for the gift
default_sell_star_count: i64Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed
upgrade_star_count: i64Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn’t possible
upgrade_variant_count: i32Number of unique gift variants that are available for the upgraded gift; 0 if unknown
has_colors: boolTrue, if the gift can be used to customize the user’s name, and backgrounds of profile photo, reply header, and link preview
is_for_birthday: boolTrue, if the gift is a birthday gift
True, if the gift can be bought only by Telegram Premium subscribers
auction_info: Option<GiftAuction>Information about the auction on which the gift can be purchased; may be null if the gift can be purchased directly
next_send_date: i32Point in time (Unix timestamp) when the gift can be sent next time by the current user; may be 0 or a date in the past. If the date is in the future, then call canSendGift to get the reason, why the gift can’t be sent now
user_limits: Option<GiftPurchaseLimits>Number of times the gift can be purchased by the current user; may be null if not limited
overall_limits: Option<GiftPurchaseLimits>Number of times the gift can be purchased all users; may be null if not limited
background: GiftBackgroundBackground of the gift
first_send_date: i32Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only
last_send_date: i32Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only