Layer 227
MessageActionStarGift
You received a gift, see here for more info.
constructor
messageActionStarGift#ea2c31d3 flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true prepaid_upgrade:flags.13?true upgrade_separate:flags.16?true auction_acquired:flags.17?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long prepaid_upgrade_hash:flags.14?string gift_msg_id:flags.15?int to_id:flags.18?Peer gift_num:flags.19?int = MessageAction;
Parameters
| Name | Type | Description |
|---|---|---|
| NameHidden | flags .0? true | If set, the name of the sender of the gift will be hidden if the destination user decides to display the gift on their profile |
| Saved | flags .2? true | Whether this gift was added to the destination user's profile (may be toggled using payments. save Star Gift and fetched using payments. get Saved Star Gifts ) |
| Converted | flags .3? true | Whether this gift was converted to Telegram Stars and cannot be displayed on the profile anymore. |
| Upgraded | flags .5? true | This gift was upgraded to a collectible gift. |
| Refunded | flags .9? true | This gift is not available anymore because a request to refund the payment related to this gift was made, and the money was returned. |
| CanUpgrade | flags .10? true | If set, this gift can be upgraded to a collectible gift; can only be set for the receiver of a gift. |
| PrepaidUpgrade | flags .13? true | The sender has already pre-paid for the upgrade of this gift to a collectible gift. |
| UpgradeSeparate | flags .16? true | This service message is the notification of a separate pre-payment for the upgrade of a gift we own. |
| AuctionAcquired | flags .17? true | If set, this gift was acquired in a collectible gifts auction. |
| Gift | StarGift | Info about the gift |
| Message | flags .1? TextWithEntities | Additional message from the sender of the gift |
| ConvertStars | flags .4? long | The 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. |
| UpgradeMsgId | flags .5? int | If set, this gift was upgraded to a collectible gift, and the corresponding message Action Star Gift Unique is available at the specified message ID. |
| UpgradeStars | flags .8? long | The number of Telegram Stars the user can pay to convert the gift into a collectible gift. |
| FromId | flags .11? Peer | Sender of the gift (unset for anonymous gifts). |
| Peer | flags .12? Peer | Receiver of the gift. |
| SavedId | flags .12? long | For channel gifts, ID to use in input Saved Star Gift Chat constructors. |
| PrepaidUpgradeHash | flags .14? string | Hash to prepay for a gift upgrade separately. |
| GiftMsgId | flags .15? int | For separate upgrades, the identifier of the message with the gift whose upgrade was prepaid (only valid for the receiver of the service message). |
| ToId | flags .18? Peer | For gifts acquired in an auction (i. e. when auction_acquired is set), the peer the gift was assigned to; only present if the target peer is different from the bidder, in which case it will only be present to the message Action Star Gift sent to the bidder, not to the message Action Star Gift sent to the target peer. |
| GiftNum | flags .19? int | For gifts acquired in an auction, the collectible number of the won collectible gift; this field is disjoint from auction_acquired because only auction collectibles won before this field was introduced in the API will not have this flag set. |
Returns
MessageActionGogram Example
// Creating MessageActionStarGift constructor obj := &tg.MessageActionStarGift{ NameHidden: nil, Saved: nil, Converted: nil, Upgraded: nil, Refunded: nil, CanUpgrade: nil, // ... more required fields }