Fix TypeError in send_sticker

This commit is contained in:
Yan 2019-07-20 10:41:15 +03:00 committed by Dan
parent 2e846f83ec
commit 3ec5f76b10

View File

@ -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)