pub struct MessageGift {Show 19 fields
pub gift: Gift,
pub sender_id: Option<MessageSender>,
pub receiver_id: MessageSender,
pub received_gift_id: String,
pub text: FormattedText,
pub unique_gift_number: i32,
pub sell_star_count: i64,
pub prepaid_upgrade_star_count: i64,
pub is_upgrade_separate: bool,
pub is_from_auction: bool,
pub is_private: bool,
pub is_saved: bool,
pub is_prepaid_upgrade: bool,
pub can_be_upgraded: bool,
pub was_converted: bool,
pub was_upgraded: bool,
pub was_refunded: bool,
pub upgraded_received_gift_id: String,
pub prepaid_upgrade_hash: String,
}Expand description
A regular gift was received or sent by the current user, or the current user was notified about a channel gift
Fields§
§gift: GiftThe gift
sender_id: Option<MessageSender>Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users
receiver_id: MessageSenderReceiver of the gift
received_gift_id: StringUnique identifier of the received gift for the current user; only for the receiver of the gift
text: FormattedTextMessage added to the gift
unique_gift_number: i32Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned
sell_star_count: i64Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can’t be sold by the receiver
prepaid_upgrade_star_count: i64Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift
is_upgrade_separate: boolTrue, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost
is_from_auction: boolTrue, if the message is a notification about a gift won on an auction
is_private: boolTrue, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
is_saved: boolTrue, if the gift is displayed on the user’s or the channel’s profile page; only for the receiver of the gift
is_prepaid_upgrade: boolTrue, if the message is about prepaid upgrade of the gift by another user
can_be_upgraded: boolTrue, if the gift can be upgraded to a unique gift; only for the receiver of the gift
was_converted: boolTrue, if the gift was converted to Telegram Stars; only for the receiver of the gift
was_upgraded: boolTrue, if the gift was upgraded to a unique gift
was_refunded: boolTrue, if the gift was refunded and isn’t available anymore
upgraded_received_gift_id: StringIdentifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift
prepaid_upgrade_hash: StringIf non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade
Trait Implementations§
Source§impl Clone for MessageGift
impl Clone for MessageGift
Source§fn clone(&self) -> MessageGift
fn clone(&self) -> MessageGift
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more