GiftAttribute¶
- class pyrogram.types.GiftAttribute¶
Contains information about a star gift attribute.
- Parameters:¶
type (:obj:`~pyrogram.enums.GiftAttributeType`) – Type of the attribute.
name (``str``, *optional*) – Name of the attribute.
backdrop_id (``int``, *optional*) – Unique backdrop identifier. Available only if the backdrop attribute is available.
rarity (:obj:`~pyrogram.types.UpgradedGiftAttributeRarityPerMille` | :obj:`~pyrogram.types.UpgradedGiftAttributeRarityUncommon` | :obj:`~pyrogram.types.UpgradedGiftAttributeRarityRare` | :obj:`~pyrogram.types.UpgradedGiftAttributeRarityEpic` | :obj:`~pyrogram.types.UpgradedGiftAttributeRarityLegendary`, *optional*) – The rarity of the model.
date (:py:obj:`~datetime.datetime`, *optional*) – Date when the gift was received. Available only if the original details are available.
caption (``str``, *optional*) – Text message. Available only if the original details are available.
caption_entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*) – For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text. Available only if the original details are available.
from_user (:obj:`~pyrogram.types.User`, *optional*) – User who sent the gift. Available only if the original details are available.
to_user (:obj:`~pyrogram.types.User`, *optional*) – User who received the gift. Available only if the original details are available.
center_color (``int``, *optional*) – Center color of the gift in decimal format. Available only if the backdrop attribute is available.
edge_color (``int``, *optional*) – Edge color of the gift in decimal format. Available only if the backdrop attribute is available.
pattern_color (``int``, *optional*) – Pattern color of the gift in decimal format. Available only if the backdrop attribute is available.
text_color (``int``, *optional*) – Text color of the gift in decimal format. Available only if the backdrop attribute is available.
sticker (:obj:`~pyrogram.types.Sticker`, *optional*) – Information about the sticker.