mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
575fb9da7f
@ -1,5 +1,5 @@
|
|||||||
py==1.4.29
|
py==1.4.29
|
||||||
pytest==3.0.2
|
pytest==3.0.2
|
||||||
requests==2.7.0
|
requests==2.20.0
|
||||||
six==1.9.0
|
six==1.9.0
|
||||||
wheel==0.24.0
|
wheel==0.24.0
|
||||||
|
@ -107,7 +107,7 @@ def get_file_url(token, file_id):
|
|||||||
if FILE_URL is None:
|
if FILE_URL is None:
|
||||||
return "https://api.telegram.org/file/bot{0}/{1}".format(token, get_file(token, file_id).file_path)
|
return "https://api.telegram.org/file/bot{0}/{1}".format(token, get_file(token, file_id).file_path)
|
||||||
else:
|
else:
|
||||||
return FILE_URL.format(token, get_file(token, file_id).file_path)
|
return FILE_URL.format(token, get_file(token, file_id)['file_path'])
|
||||||
|
|
||||||
|
|
||||||
def download_file(token, file_path):
|
def download_file(token, file_path):
|
||||||
|
@ -371,6 +371,9 @@ class Message(JsonDeserializable):
|
|||||||
if 'poll' in obj:
|
if 'poll' in obj:
|
||||||
opts['poll'] = Poll.de_json(obj['poll'])
|
opts['poll'] = Poll.de_json(obj['poll'])
|
||||||
content_type = 'poll'
|
content_type = 'poll'
|
||||||
|
if 'passport_data' in obj:
|
||||||
|
opts['passport_data'] = obj['passport_data']
|
||||||
|
content_type = 'passport_data'
|
||||||
return cls(message_id, from_user, date, chat, content_type, opts, json_string)
|
return cls(message_id, from_user, date, chat, content_type, opts, json_string)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user