Add is_premium to Sticker

This commit is contained in:
KurimuzonAkuma 2023-12-14 00:52:26 +03:00
parent 719bd87038
commit 2c55334b90

View File

@ -45,10 +45,13 @@ class Sticker(Object):
Sticker height.
is_animated (``bool``):
True, if the sticker is animated
True, if the sticker is animated.
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*):
Sticker file name.
@ -84,6 +87,7 @@ class Sticker(Object):
height: int,
is_animated: bool,
is_video: bool,
is_premium: bool,
file_name: str = None,
mime_type: str = None,
file_size: int = None,
@ -104,6 +108,7 @@ class Sticker(Object):
self.height = height
self.is_animated = is_animated
self.is_video = is_video
self.is_premium = is_premium
self.emoji = emoji
self.set_name = set_name
self.thumbs = thumbs
@ -194,6 +199,7 @@ class Sticker(Object):
),
is_animated=sticker.mime_type == "application/x-tgsticker",
is_video=sticker.mime_type == "video/webm",
is_premium=bool(sticker.video_thumbs),
# TODO: mask_position
set_name=set_name,
emoji=sticker_attributes.alt or None,