Support .download_media with bot API file_id

This commit is contained in:
Lonami Exo 2018-08-01 13:39:34 +02:00
parent e359b428c3
commit 80a5e709cb

View File

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