MessageGift¶
A regular gift was received or sent by the current user, or the current user was notified about a channel gift
MessageGift(
gift: Gift,
sender_id: MessageSender,
receiver_id: MessageSender,
received_gift_id: string,
text: FormattedText,
unique_gift_number: int32,
sell_star_count: int53,
prepaid_upgrade_star_count: int53,
is_upgrade_separate: Bool,
is_from_auction: Bool,
is_private: Bool,
is_saved: Bool,
is_prepaid_upgrade: Bool,
can_be_upgraded: Bool,
was_converted: Bool,
was_upgraded: Bool,
was_refunded: Bool,
upgraded_received_gift_id: string,
prepaid_upgrade_hash: string
) → MessageContent
gift¶
The gift
sender_id¶
Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users
receiver_id¶
Receiver of the gift
received_gift_id¶
string
Unique identifier of the received gift for the current user; only for the receiver of the gift
text¶
Message added to the gift
unique_gift_number¶
int32
Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned
sell_star_count¶
int53
Number 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¶
int53
Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift
is_upgrade_separate¶
Bool
True, 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¶
Bool
True, if the message is a notification about a gift won on an auction
is_private¶
Bool
True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
is_saved¶
Bool
True, 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¶
Bool
True, if the message is about prepaid upgrade of the gift by another user
can_be_upgraded¶
Bool
True, if the gift can be upgraded to a unique gift; only for the receiver of the gift
was_converted¶
Bool
True, if the gift was converted to Telegram Stars; only for the receiver of the gift
was_upgraded¶
Bool
True, if the gift was upgraded to a unique gift
was_refunded¶
Bool
True, if the gift was refunded and isn't available anymore
upgraded_received_gift_id¶
string
Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift
prepaid_upgrade_hash¶
string
If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade