From 2c55334b90b4a3c8fbc60a40522d1fd94e4a9e8c Mon Sep 17 00:00:00 2001 From: KurimuzonAkuma Date: Thu, 14 Dec 2023 00:52:26 +0300 Subject: [PATCH] Add is_premium to Sticker --- pyrogram/types/messages_and_media/sticker.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pyrogram/types/messages_and_media/sticker.py b/pyrogram/types/messages_and_media/sticker.py index de266b2f..8b37df2d 100644 --- a/pyrogram/types/messages_and_media/sticker.py +++ b/pyrogram/types/messages_and_media/sticker.py @@ -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,