MessageActionStarGift
- class pyrogram.raw.types.MessageActionStarGift
You received a gift, see here » for more info.
Constructor of
MessageAction.- Details:
Layer:
223ID:
EA2C31D3
- Parameters:
gift (
StarGift) – Info about the giftname_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 profilesaved (
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 giftconvert_stars (
int64-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 (
int32-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 (
int64-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 (
int64-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 (
int32-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 (
int32-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
true (optional)true (optional)true (optional)true (optional)true (optional)true (optional)true (optional)true (optional)true (optional)StarGiftStarGifttrue (optional)true (optional)true (optional)true (optional)true (optional)true (optional)true (optional)longDocumentDocumentEmptylongDocumentlonglongbytesintstringlongVector < PhotoSize > (optional)PhotoSizeEmptyPhotoSizePhotoCachedSizePhotoStrippedSizePhotoSizeProgressivePhotoPathSizeVector < VideoSize > (optional)VideoSizeVideoSizeEmojiMarkupVideoSizeStickerMarkupintVector < DocumentAttribute >DocumentAttributeImageSizeDocumentAttributeAnimatedDocumentAttributeStickerDocumentAttributeVideoDocumentAttributeAudioDocumentAttributeFilenameDocumentAttributeHasStickersDocumentAttributeCustomEmojilongint (optional)int (optional)long (optional)longint (optional)int (optional)long (optional)long (optional)string (optional)Peer (optional)PeerUserlongPeerChatlongPeerChannellongint (optional)int (optional)int (optional)string (optional)int (optional)int (optional)int (optional)StarGiftBackground (optional)StarGiftBackgroundintintintStarGiftUniquetrue (optional)true (optional)true (optional)true (optional)true (optional)longlongstringstringintPeer (optional)PeerUserlongPeerChatlongPeerChannellongstring (optional)string (optional)Vector < StarGiftAttribute >StarGiftAttributeModeltrue (optional)stringDocumentDocumentEmptyDocumentStarGiftAttributeRarityStarGiftAttributeRarityStarGiftAttributeRarityUncommonStarGiftAttributeRarityRareStarGiftAttributeRarityEpicStarGiftAttributeRarityLegendaryStarGiftAttributePatternstringDocumentDocumentEmptyDocumentStarGiftAttributeRarityStarGiftAttributeRarityStarGiftAttributeRarityUncommonStarGiftAttributeRarityRareStarGiftAttributeRarityEpicStarGiftAttributeRarityLegendaryStarGiftAttributeBackdropstringintintintintintStarGiftAttributeRarityStarGiftAttributeRarityStarGiftAttributeRarityUncommonStarGiftAttributeRarityRareStarGiftAttributeRarityEpicStarGiftAttributeRarityLegendaryStarGiftAttributeOriginalDetailsPeer (optional)PeerUserPeerChatPeerChannelPeerPeerUserPeerChatPeerChannelintTextWithEntities (optional)TextWithEntitiesintintstring (optional)Vector < StarsAmount > (optional)StarsAmountlongintStarsTonAmountlongPeer (optional)PeerUserlongPeerChatlongPeerChannellonglong (optional)string (optional)long (optional)Peer (optional)PeerUserlongPeerChatlongPeerChannellongPeerColor (optional)PeerColorint (optional)long (optional)PeerColorCollectiblelonglonglongintVector < int >int (optional)Vector < int > (optional)InputPeerColorCollectiblelongPeer (optional)PeerUserlongPeerChatlongPeerChannellongint (optional)int (optional)TextWithEntities (optional)TextWithEntitiesstringVector < MessageEntity >MessageEntityUnknownintintMessageEntityMentionintintMessageEntityHashtagintintMessageEntityBotCommandintintMessageEntityUrlintintMessageEntityEmailintintMessageEntityBoldintintMessageEntityItalicintintMessageEntityCodeintintMessageEntityPreintintstringMessageEntityTextUrlintintstringMessageEntityMentionNameintintlongintintInputUserInputUserEmptyInputUserSelfInputUserInputUserFromMessageMessageEntityPhoneintintMessageEntityCashtagintintMessageEntityUnderlineintintMessageEntityStrikeintintMessageEntityBankCardintintMessageEntitySpoilerintintMessageEntityCustomEmojiintintlongMessageEntityBlockquotetrue (optional)intinttrue (optional)true (optional)true (optional)true (optional)true (optional)true (optional)intintintlong (optional)int (optional)long (optional)Peer (optional)PeerUserlongPeerChatlongPeerChannellongPeer (optional)PeerUserlongPeerChatlongPeerChannellonglong (optional)string (optional)int (optional)Peer (optional)PeerUserlongPeerChatlongPeerChannellongint (optional)Example
MessageActionStarGift(
gift=StarGift(
id=0,
sticker=DocumentEmpty(id=0),
stars=0,
convert_stars=0
),
)