mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Support .download_media with bot API file_id
This commit is contained in:
parent
e359b428c3
commit
80a5e709cb
|
@ -129,6 +129,9 @@ class DownloadMethods(UserMethods):
|
|||
date = datetime.datetime.now()
|
||||
media = message
|
||||
|
||||
if isinstance(media, str):
|
||||
media = utils.resolve_bot_file_id(media)
|
||||
|
||||
if isinstance(media, types.MessageMediaWebPage):
|
||||
if isinstance(media.webpage, types.WebPage):
|
||||
media = media.webpage.document or media.webpage.photo
|
||||
|
|
Loading…
Reference in New Issue
Block a user