mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-23 23:34:28 +00:00
Add is_premium to Sticker
This commit is contained in:
parent
719bd87038
commit
2c55334b90
@ -45,10 +45,13 @@ class Sticker(Object):
|
|||||||
Sticker height.
|
Sticker height.
|
||||||
|
|
||||||
is_animated (``bool``):
|
is_animated (``bool``):
|
||||||
True, if the sticker is animated
|
True, if the sticker is animated.
|
||||||
|
|
||||||
is_video (``bool``):
|
is_video (``bool``):
|
||||||
True, if the sticker is a video sticker
|
True, if the sticker is a video sticker.
|
||||||
|
|
||||||
|
is_premium (``bool``):
|
||||||
|
True, if the sticker is a premium only.
|
||||||
|
|
||||||
file_name (``str``, *optional*):
|
file_name (``str``, *optional*):
|
||||||
Sticker file name.
|
Sticker file name.
|
||||||
@ -84,6 +87,7 @@ class Sticker(Object):
|
|||||||
height: int,
|
height: int,
|
||||||
is_animated: bool,
|
is_animated: bool,
|
||||||
is_video: bool,
|
is_video: bool,
|
||||||
|
is_premium: bool,
|
||||||
file_name: str = None,
|
file_name: str = None,
|
||||||
mime_type: str = None,
|
mime_type: str = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
@ -104,6 +108,7 @@ class Sticker(Object):
|
|||||||
self.height = height
|
self.height = height
|
||||||
self.is_animated = is_animated
|
self.is_animated = is_animated
|
||||||
self.is_video = is_video
|
self.is_video = is_video
|
||||||
|
self.is_premium = is_premium
|
||||||
self.emoji = emoji
|
self.emoji = emoji
|
||||||
self.set_name = set_name
|
self.set_name = set_name
|
||||||
self.thumbs = thumbs
|
self.thumbs = thumbs
|
||||||
@ -194,6 +199,7 @@ class Sticker(Object):
|
|||||||
),
|
),
|
||||||
is_animated=sticker.mime_type == "application/x-tgsticker",
|
is_animated=sticker.mime_type == "application/x-tgsticker",
|
||||||
is_video=sticker.mime_type == "video/webm",
|
is_video=sticker.mime_type == "video/webm",
|
||||||
|
is_premium=bool(sticker.video_thumbs),
|
||||||
# TODO: mask_position
|
# TODO: mask_position
|
||||||
set_name=set_name,
|
set_name=set_name,
|
||||||
emoji=sticker_attributes.alt or None,
|
emoji=sticker_attributes.alt or None,
|
||||||
|
Loading…
Reference in New Issue
Block a user