MessageActionStarGift

class pyrogram.raw.types.MessageActionStarGift

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

Constructor of MessageAction.

Details:
  • Layer: 227

  • 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_hidden → true (optional)
├── saved → true (optional)
├── converted → true (optional)
├── upgraded → true (optional)
├── refunded → true (optional)
├── can_upgrade → true (optional)
├── prepaid_upgrade → true (optional)
├── upgrade_separate → true (optional)
├── auction_acquired → true (optional)
├── gift → StarGift
│ ├── StarGift
│ │ ├── limited → true (optional)
│ │ ├── sold_out → true (optional)
│ │ ├── birthday → true (optional)
│ │ ├── require_premium → true (optional)
│ │ ├── limited_per_user → true (optional)
│ │ ├── peer_color_available → true (optional)
│ │ ├── auction → true (optional)
│ │ ├── id → long
│ │ ├── sticker → Document
│ │ │ ├── DocumentEmpty
│ │ │ │ └── id → long
│ │ │ └── Document
│ │ │ ├── id → long
│ │ │ ├── access_hash → long
│ │ │ ├── file_reference → bytes
│ │ │ ├── date → int
│ │ │ ├── mime_type → string
│ │ │ ├── size → long
│ │ │ ├── thumbs → Vector < PhotoSize > (optional)
│ │ │ │ ├── PhotoSizeEmpty
│ │ │ │ ├── PhotoSize
│ │ │ │ ├── PhotoCachedSize
│ │ │ │ ├── PhotoStrippedSize
│ │ │ │ ├── PhotoSizeProgressive
│ │ │ │ └── PhotoPathSize
│ │ │ ├── video_thumbs → Vector < VideoSize > (optional)
│ │ │ │ ├── VideoSize
│ │ │ │ ├── VideoSizeEmojiMarkup
│ │ │ │ └── VideoSizeStickerMarkup
│ │ │ ├── dc_id → int
│ │ │ └── attributes → Vector < DocumentAttribute >
│ │ │ ├── DocumentAttributeImageSize
│ │ │ ├── DocumentAttributeAnimated
│ │ │ ├── DocumentAttributeSticker
│ │ │ ├── DocumentAttributeVideo
│ │ │ ├── DocumentAttributeAudio
│ │ │ ├── DocumentAttributeFilename
│ │ │ ├── DocumentAttributeHasStickers
│ │ │ └── DocumentAttributeCustomEmoji
│ │ ├── stars → long
│ │ ├── availability_remains → int (optional)
│ │ ├── availability_total → int (optional)
│ │ ├── availability_resale → long (optional)
│ │ ├── convert_stars → long
│ │ ├── first_sale_date → int (optional)
│ │ ├── last_sale_date → int (optional)
│ │ ├── upgrade_stars → long (optional)
│ │ ├── resell_min_stars → long (optional)
│ │ ├── title → string (optional)
│ │ ├── released_by → Peer (optional)
│ │ │ ├── PeerUser
│ │ │ │ └── user_id → long
│ │ │ ├── PeerChat
│ │ │ │ └── chat_id → long
│ │ │ └── PeerChannel
│ │ │ └── channel_id → long
│ │ ├── per_user_total → int (optional)
│ │ ├── per_user_remains → int (optional)
│ │ ├── locked_until_date → int (optional)
│ │ ├── auction_slug → string (optional)
│ │ ├── gifts_per_round → int (optional)
│ │ ├── auction_start_date → int (optional)
│ │ ├── upgrade_variants → int (optional)
│ │ └── background → StarGiftBackground (optional)
│ │ └── StarGiftBackground
│ │ ├── center_color → int
│ │ ├── edge_color → int
│ │ └── text_color → int
│ └── StarGiftUnique
│ ├── require_premium → true (optional)
│ ├── resale_ton_only → true (optional)
│ ├── theme_available → true (optional)
│ ├── burned → true (optional)
│ ├── crafted → true (optional)
│ ├── id → long
│ ├── gift_id → long
│ ├── title → string
│ ├── slug → string
│ ├── num → int
│ ├── owner_id → Peer (optional)
│ │ ├── PeerUser
│ │ │ └── user_id → long
│ │ ├── PeerChat
│ │ │ └── chat_id → long
│ │ └── PeerChannel
│ │ └── channel_id → long
│ ├── owner_name → string (optional)
│ ├── owner_address → string (optional)
│ ├── attributes → Vector < StarGiftAttribute >
│ │ ├── StarGiftAttributeModel
│ │ │ ├── crafted → true (optional)
│ │ │ ├── name → string
│ │ │ ├── document → Document
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ └── rarity → StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── StarGiftAttributePattern
│ │ │ ├── name → string
│ │ │ ├── document → Document
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ └── rarity → StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── StarGiftAttributeBackdrop
│ │ │ ├── name → string
│ │ │ ├── backdrop_id → int
│ │ │ ├── center_color → int
│ │ │ ├── edge_color → int
│ │ │ ├── pattern_color → int
│ │ │ ├── text_color → int
│ │ │ └── rarity → StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── sender_id → Peer (optional)
│ │ │ ├── PeerUser
│ │ │ ├── PeerChat
│ │ │ └── PeerChannel
│ │ ├── recipient_id → Peer
│ │ │ ├── PeerUser
│ │ │ ├── PeerChat
│ │ │ └── PeerChannel
│ │ ├── date → int
│ │ └── message → TextWithEntities (optional)
│ │ └── TextWithEntities
│ ├── availability_issued → int
│ ├── availability_total → int
│ ├── gift_address → string (optional)
│ ├── resell_amount → Vector < StarsAmount > (optional)
│ │ ├── StarsAmount
│ │ │ ├── amount → long
│ │ │ └── nanos → int
│ │ └── StarsTonAmount
│ │ └── amount → long
│ ├── released_by → Peer (optional)
│ │ ├── PeerUser
│ │ │ └── user_id → long
│ │ ├── PeerChat
│ │ │ └── chat_id → long
│ │ └── PeerChannel
│ │ └── channel_id → long
│ ├── value_amount → long (optional)
│ ├── value_currency → string (optional)
│ ├── value_usd_amount → long (optional)
│ ├── theme_peer → Peer (optional)
│ │ ├── PeerUser
│ │ │ └── user_id → long
│ │ ├── PeerChat
│ │ │ └── chat_id → long
│ │ └── PeerChannel
│ │ └── channel_id → long
│ ├── peer_color → PeerColor (optional)
│ │ ├── PeerColor
│ │ │ ├── color → int (optional)
│ │ │ └── background_emoji_id → long (optional)
│ │ ├── PeerColorCollectible
│ │ │ ├── collectible_id → long
│ │ │ ├── gift_emoji_id → long
│ │ │ ├── background_emoji_id → long
│ │ │ ├── accent_color → int
│ │ │ ├── colors → Vector < int >
│ │ │ ├── dark_accent_color → int (optional)
│ │ │ └── dark_colors → Vector < int > (optional)
│ │ └── InputPeerColorCollectible
│ │ └── collectible_id → long
│ ├── host_id → Peer (optional)
│ │ ├── PeerUser
│ │ │ └── user_id → long
│ │ ├── PeerChat
│ │ │ └── chat_id → long
│ │ └── PeerChannel
│ │ └── channel_id → long
│ ├── offer_min_stars → int (optional)
│ └── craft_chance_permille → int (optional)
├── message → TextWithEntities (optional)
│ └── TextWithEntities
│ ├── text → string
│ └── entities → Vector < MessageEntity >
│ ├── MessageEntityUnknown
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityMention
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityHashtag
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityUrl
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityEmail
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityBold
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityItalic
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityCode
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityPre
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── language → string
│ ├── MessageEntityTextUrl
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── url → string
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── user_id → long
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── user_id → InputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ ├── MessageEntityPhone
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityCashtag
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityStrike
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityBankCard
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntitySpoiler
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── document_id → long
│ │ ├── collapsed → true (optional)
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── relative → true (optional)
│ │ ├── short_time → true (optional)
│ │ ├── long_time → true (optional)
│ │ ├── short_date → true (optional)
│ │ ├── long_date → true (optional)
│ │ ├── day_of_week → true (optional)
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── date → int
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── old_text → string
│ ├── offset → int
│ └── length → int
├── convert_stars → long (optional)
├── upgrade_msg_id → int (optional)
├── upgrade_stars → long (optional)
├── from_id → Peer (optional)
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── peer → Peer (optional)
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── saved_id → long (optional)
├── prepaid_upgrade_hash → string (optional)
├── gift_msg_id → int (optional)
├── to_id → Peer (optional)
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
└── gift_num → int (optional)

Example

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