From 3ec5f76b104b8cf14bf1f4d8104595d7d618e485 Mon Sep 17 00:00:00 2001 From: Yan Date: Sat, 20 Jul 2019 10:41:15 +0300 Subject: [PATCH] Fix TypeError in send_sticker --- pyrogram/client/methods/messages/send_sticker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/methods/messages/send_sticker.py b/pyrogram/client/methods/messages/send_sticker.py index 8cccfe01..60b8609e 100644 --- a/pyrogram/client/methods/messages/send_sticker.py +++ b/pyrogram/client/methods/messages/send_sticker.py @@ -134,7 +134,7 @@ class SendSticker(BaseClient): elif hasattr(sticker, "read"): file = self.save_file(sticker, progress=progress, progress_args=progress_args) media = types.InputMediaUploadedDocument( - mime_type=self.guess_mime_type(sticker) or "image/webp", + mime_type=self.guess_mime_type(sticker.name) or "image/webp", file=file, attributes=[ types.DocumentAttributeFilename(file_name=sticker.name)