MessageActionStarGift

class pyrogram.raw.types.MessageActionStarGift

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

Constructor of MessageAction.

Details:
  • Layer: 223

  • ID: EA2C31D3

Parameters:
  • gift (StarGift) – Info about the gift

  • name_hidden (bool, optional) – 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 (bool, optional) – Whether this gift was added to the destination user’s profile (may be toggled using payments.saveStarGift and fetched using payments.getSavedStarGifts)

  • converted (bool, optional) – Whether this gift was converted to Telegram Stars and cannot be displayed on the profile anymore.

  • upgraded (bool, optional) – This gift was upgraded to a collectible gift ».

  • refunded (bool, optional) – This gift is not available anymore because a request to refund the payment related to this gift was made, and the money was returned.

  • can_upgrade (bool, optional) – If set, this gift can be upgraded to a collectible gift; can only be set for the receiver of a gift.

  • prepaid_upgrade (bool, optional) – The sender has already pre-paid for the upgrade of this gift to a collectible gift.

  • upgrade_separate (bool, optional) – This service message is the notification of a separate pre-payment for the upgrade of a gift we own.

  • auction_acquired (bool, optional)

  • message (TextWithEntities, optional) – Additional message from the sender of the gift

  • convert_stars (int 64-bit, optional) – 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.

  • upgrade_msg_id (int 32-bit, optional) – If set, this gift was upgraded to a collectible gift, and the corresponding messageActionStarGiftUnique is available at the specified message ID.

  • upgrade_stars (int 64-bit, optional) – The number of Telegram Stars the user can pay to convert the gift into a collectible gift ».

  • from_id (Peer, optional) – Sender of the gift (unset for anonymous gifts).

  • peer (Peer, optional) – Receiver of the gift.

  • saved_id (int 64-bit, optional) – For channel gifts, ID to use in inputSavedStarGiftChat constructors.

  • prepaid_upgrade_hash (str, optional) – Hash to prepay for a gift upgrade separately ».

  • gift_msg_id (int 32-bit, optional) – For separate upgrades, the identifier of the message with the gift whose upgrade was prepaid (only valid for the receiver of the service message).

  • to_id (Peer, optional)

  • gift_num (int 32-bit, optional)

TL Schema

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

Parameter Tree

MessageActionStarGift
├── name_hiddentrue (optional)
├── savedtrue (optional)
├── convertedtrue (optional)
├── upgradedtrue (optional)
├── refundedtrue (optional)
├── can_upgradetrue (optional)
├── prepaid_upgradetrue (optional)
├── upgrade_separatetrue (optional)
├── auction_acquiredtrue (optional)
├── giftStarGift
│ ├── StarGift
│ │ ├── limitedtrue (optional)
│ │ ├── sold_outtrue (optional)
│ │ ├── birthdaytrue (optional)
│ │ ├── require_premiumtrue (optional)
│ │ ├── limited_per_usertrue (optional)
│ │ ├── peer_color_availabletrue (optional)
│ │ ├── auctiontrue (optional)
│ │ ├── idlong
│ │ ├── stickerDocument
│ │ │ ├── DocumentEmpty
│ │ │ │ └── idlong
│ │ │ └── Document
│ │ │ ├── idlong
│ │ │ ├── access_hashlong
│ │ │ ├── file_referencebytes
│ │ │ ├── dateint
│ │ │ ├── mime_typestring
│ │ │ ├── sizelong
│ │ │ ├── thumbsVector < PhotoSize > (optional)
│ │ │ │ ├── PhotoSizeEmpty
│ │ │ │ ├── PhotoSize
│ │ │ │ ├── PhotoCachedSize
│ │ │ │ ├── PhotoStrippedSize
│ │ │ │ ├── PhotoSizeProgressive
│ │ │ │ └── PhotoPathSize
│ │ │ ├── video_thumbsVector < VideoSize > (optional)
│ │ │ │ ├── VideoSize
│ │ │ │ ├── VideoSizeEmojiMarkup
│ │ │ │ └── VideoSizeStickerMarkup
│ │ │ ├── dc_idint
│ │ │ └── attributesVector < DocumentAttribute >
│ │ │ ├── DocumentAttributeImageSize
│ │ │ ├── DocumentAttributeAnimated
│ │ │ ├── DocumentAttributeSticker
│ │ │ ├── DocumentAttributeVideo
│ │ │ ├── DocumentAttributeAudio
│ │ │ ├── DocumentAttributeFilename
│ │ │ ├── DocumentAttributeHasStickers
│ │ │ └── DocumentAttributeCustomEmoji
│ │ ├── starslong
│ │ ├── availability_remainsint (optional)
│ │ ├── availability_totalint (optional)
│ │ ├── availability_resalelong (optional)
│ │ ├── convert_starslong
│ │ ├── first_sale_dateint (optional)
│ │ ├── last_sale_dateint (optional)
│ │ ├── upgrade_starslong (optional)
│ │ ├── resell_min_starslong (optional)
│ │ ├── titlestring (optional)
│ │ ├── released_byPeer (optional)
│ │ │ ├── PeerUser
│ │ │ │ └── user_idlong
│ │ │ ├── PeerChat
│ │ │ │ └── chat_idlong
│ │ │ └── PeerChannel
│ │ │ └── channel_idlong
│ │ ├── per_user_totalint (optional)
│ │ ├── per_user_remainsint (optional)
│ │ ├── locked_until_dateint (optional)
│ │ ├── auction_slugstring (optional)
│ │ ├── gifts_per_roundint (optional)
│ │ ├── auction_start_dateint (optional)
│ │ ├── upgrade_variantsint (optional)
│ │ └── backgroundStarGiftBackground (optional)
│ │ └── StarGiftBackground
│ │ ├── center_colorint
│ │ ├── edge_colorint
│ │ └── text_colorint
│ └── StarGiftUnique
│ ├── require_premiumtrue (optional)
│ ├── resale_ton_onlytrue (optional)
│ ├── theme_availabletrue (optional)
│ ├── burnedtrue (optional)
│ ├── craftedtrue (optional)
│ ├── idlong
│ ├── gift_idlong
│ ├── titlestring
│ ├── slugstring
│ ├── numint
│ ├── owner_idPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ ├── owner_namestring (optional)
│ ├── owner_addressstring (optional)
│ ├── attributesVector < StarGiftAttribute >
│ │ ├── StarGiftAttributeModel
│ │ │ ├── craftedtrue (optional)
│ │ │ ├── namestring
│ │ │ ├── documentDocument
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ └── rarityStarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── StarGiftAttributePattern
│ │ │ ├── namestring
│ │ │ ├── documentDocument
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ └── rarityStarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── StarGiftAttributeBackdrop
│ │ │ ├── namestring
│ │ │ ├── backdrop_idint
│ │ │ ├── center_colorint
│ │ │ ├── edge_colorint
│ │ │ ├── pattern_colorint
│ │ │ ├── text_colorint
│ │ │ └── rarityStarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── sender_idPeer (optional)
│ │ │ ├── PeerUser
│ │ │ ├── PeerChat
│ │ │ └── PeerChannel
│ │ ├── recipient_idPeer
│ │ │ ├── PeerUser
│ │ │ ├── PeerChat
│ │ │ └── PeerChannel
│ │ ├── dateint
│ │ └── messageTextWithEntities (optional)
│ │ └── TextWithEntities
│ ├── availability_issuedint
│ ├── availability_totalint
│ ├── gift_addressstring (optional)
│ ├── resell_amountVector < StarsAmount > (optional)
│ │ ├── StarsAmount
│ │ │ ├── amountlong
│ │ │ └── nanosint
│ │ └── StarsTonAmount
│ │ └── amountlong
│ ├── released_byPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ ├── value_amountlong (optional)
│ ├── value_currencystring (optional)
│ ├── value_usd_amountlong (optional)
│ ├── theme_peerPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ ├── peer_colorPeerColor (optional)
│ │ ├── PeerColor
│ │ │ ├── colorint (optional)
│ │ │ └── background_emoji_idlong (optional)
│ │ ├── PeerColorCollectible
│ │ │ ├── collectible_idlong
│ │ │ ├── gift_emoji_idlong
│ │ │ ├── background_emoji_idlong
│ │ │ ├── accent_colorint
│ │ │ ├── colorsVector < int >
│ │ │ ├── dark_accent_colorint (optional)
│ │ │ └── dark_colorsVector < int > (optional)
│ │ └── InputPeerColorCollectible
│ │ └── collectible_idlong
│ ├── host_idPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ ├── offer_min_starsint (optional)
│ └── craft_chance_permilleint (optional)
├── messageTextWithEntities (optional)
│ └── TextWithEntities
│ ├── textstring
│ └── entitiesVector < MessageEntity >
│ ├── MessageEntityUnknown
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityMention
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityHashtag
│ │ ├── offsetint
│ │ └── lengthint
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityUrl
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityEmail
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityBold
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityItalic
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityCode
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityPre
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── languagestring
│ ├── MessageEntityTextUrl
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── urlstring
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── user_idlong
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── user_idInputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ ├── MessageEntityPhone
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityCashtag
│ │ ├── offsetint
│ │ └── lengthint
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityStrike
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityBankCard
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntitySpoiler
│ │ ├── offsetint
│ │ └── lengthint
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── document_idlong
│ │ ├── collapsedtrue (optional)
│ │ ├── offsetint
│ │ └── lengthint
│ ├── relativetrue (optional)
│ ├── short_timetrue (optional)
│ ├── long_timetrue (optional)
│ ├── short_datetrue (optional)
│ ├── long_datetrue (optional)
│ ├── day_of_weektrue (optional)
│ ├── offsetint
│ ├── lengthint
│ └── dateint
├── convert_starslong (optional)
├── upgrade_msg_idint (optional)
├── upgrade_starslong (optional)
├── from_idPeer (optional)
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── peerPeer (optional)
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── saved_idlong (optional)
├── prepaid_upgrade_hashstring (optional)
├── gift_msg_idint (optional)
├── to_idPeer (optional)
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
└── gift_numint (optional)

Example

MessageActionStarGift(
    gift=StarGift(
        id=0,
        sticker=DocumentEmpty(id=0),
        stars=0,
        convert_stars=0
    ),
)