Link Search Menu Expand Document

Constructor: messageActionStarGift

Back to constructors index

You received a gift, see here » for more info.

Attributes:

NameTypeRequiredDescription
name_hiddenBoolOptionalIf set, the name of the sender of the gift will be hidden if the destination user decides to display the gift on their profile
savedBoolOptionalWhether this gift was added to the destination user’s profile (may be toggled using payments.saveStarGift and fetched using payments.getSavedStarGifts)
convertedBoolOptionalWhether this gift was converted to Telegram Stars and cannot be displayed on the profile anymore.
upgradedBoolOptionalThis gift was upgraded to a collectible gift ».
refundedBoolOptionalThis gift is not available anymore because a request to refund the payment related to this gift was made, and the money was returned.
can_upgradeBoolOptionalIf set, this gift can be upgraded to a collectible gift; can only be set for the receiver of a gift.
prepaid_upgradeBoolOptionalThe sender has already pre-paid for the upgrade of this gift to a collectible gift.
upgrade_separateBoolOptionalThis service message is the notification of a separate pre-payment for the upgrade of a gift we own.
giftStarGiftYesInfo about the gift
messageTextWithEntitiesOptionalAdditional message from the sender of the gift
convert_starslongOptionalThe receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.
convert_stars will be equal to stars only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars.
upgrade_msg_idintOptionalIf set, this gift was upgraded to a collectible gift, and the corresponding messageActionStarGiftUnique is available at the specified message ID.
upgrade_starslongOptionalThe number of Telegram Stars the user can pay to convert the gift into a collectible gift ».
from_idPeerOptionalSender of the gift (unset for anonymous gifts).
peerlongOptionalReceiver of the gift.
saved_idlongOptionalFor channel gifts, ID to use in inputSavedStarGiftChat constructors.
prepaid_upgrade_hashstringOptionalHash to prepay for a gift upgrade separately ».
gift_msg_idintOptionalFor separate upgrades, the identifier of the message with the gift whose upgrade was prepaid (only valid for the receiver of the service message).

Type: MessageAction

Example:

$messageActionStarGift = ['_' => 'messageActionStarGift', 'name_hidden' => Bool, 'saved' => Bool, 'converted' => Bool, 'upgraded' => Bool, 'refunded' => Bool, 'can_upgrade' => Bool, 'prepaid_upgrade' => Bool, 'upgrade_separate' => Bool, 'gift' => StarGift, 'message' => TextWithEntities, 'convert_stars' => long, 'upgrade_msg_id' => int, 'upgrade_stars' => long, 'from_id' => Peer, 'peer' => long, 'saved_id' => long, 'prepaid_upgrade_hash' => 'string', 'gift_msg_id' => int];