mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Make Photo work in download_media
This commit is contained in:
parent
fbf69fb8bd
commit
0dfe373c88
@ -77,7 +77,7 @@ class DownloadMedia(BaseClient):
|
||||
"""
|
||||
if isinstance(message, pyrogram_types.Message):
|
||||
if message.photo:
|
||||
media = message.photo[-1]
|
||||
media = message.photo.sizes[-1]
|
||||
elif message.audio:
|
||||
media = message.audio
|
||||
elif message.document:
|
||||
@ -95,7 +95,7 @@ class DownloadMedia(BaseClient):
|
||||
else:
|
||||
return
|
||||
elif isinstance(message, (
|
||||
pyrogram_types.PhotoSize,
|
||||
pyrogram_types.Photo,
|
||||
pyrogram_types.Audio,
|
||||
pyrogram_types.Document,
|
||||
pyrogram_types.Video,
|
||||
|
Loading…
Reference in New Issue
Block a user