diff --git a/pyrogram/client/utils.py b/pyrogram/client/utils.py index 93f8b4ee..6a5042a8 100644 --- a/pyrogram/client/utils.py +++ b/pyrogram/client/utils.py @@ -142,6 +142,7 @@ def parse_message(message: types.Message, users: dict, chats: dict): voice = None video = None video_note = None + sticker = None media = message.media @@ -277,6 +278,25 @@ def parse_message(message: types.Message, users: dict, chats: dict): mime_type=doc.mime_type, file_size=doc.size ) + elif types.DocumentAttributeSticker in attributes: + image_size_attribute = attributes[types.DocumentAttributeImageSize] + + sticker = pyrogram.Sticker( + file_id=encode( + pack( + "