mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
parent
818905de32
commit
5e19965b0c
@ -498,7 +498,10 @@ def send_video(token, chat_id, data, duration=None, caption=None, reply_to_messa
|
|||||||
payload['connect-timeout'] = timeout
|
payload['connect-timeout'] = timeout
|
||||||
if thumb:
|
if thumb:
|
||||||
if not util.is_string(thumb):
|
if not util.is_string(thumb):
|
||||||
files['thumb'] = thumb
|
if files:
|
||||||
|
files['thumb'] = thumb
|
||||||
|
else:
|
||||||
|
files = {'thumb': thumb}
|
||||||
else:
|
else:
|
||||||
payload['thumb'] = thumb
|
payload['thumb'] = thumb
|
||||||
if width:
|
if width:
|
||||||
@ -533,7 +536,10 @@ def send_animation(token, chat_id, data, duration=None, caption=None, reply_to_m
|
|||||||
payload['connect-timeout'] = timeout
|
payload['connect-timeout'] = timeout
|
||||||
if thumb:
|
if thumb:
|
||||||
if not util.is_string(thumb):
|
if not util.is_string(thumb):
|
||||||
files['thumb'] = thumb
|
if files:
|
||||||
|
files['thumb'] = thumb
|
||||||
|
else:
|
||||||
|
files = {'thumb': thumb}
|
||||||
else:
|
else:
|
||||||
payload['thumb'] = thumb
|
payload['thumb'] = thumb
|
||||||
return _make_request(token, method_url, params=payload, files=files, method='post')
|
return _make_request(token, method_url, params=payload, files=files, method='post')
|
||||||
@ -590,7 +596,10 @@ def send_video_note(token, chat_id, data, duration=None, length=None, reply_to_m
|
|||||||
payload['connect-timeout'] = timeout
|
payload['connect-timeout'] = timeout
|
||||||
if thumb:
|
if thumb:
|
||||||
if not util.is_string(thumb):
|
if not util.is_string(thumb):
|
||||||
files['thumb'] = thumb
|
if files:
|
||||||
|
files['thumb'] = thumb
|
||||||
|
else:
|
||||||
|
files = {'thumb': thumb}
|
||||||
else:
|
else:
|
||||||
payload['thumb'] = thumb
|
payload['thumb'] = thumb
|
||||||
return _make_request(token, method_url, params=payload, files=files, method='post')
|
return _make_request(token, method_url, params=payload, files=files, method='post')
|
||||||
@ -625,7 +634,10 @@ def send_audio(token, chat_id, audio, caption=None, duration=None, performer=Non
|
|||||||
payload['connect-timeout'] = timeout
|
payload['connect-timeout'] = timeout
|
||||||
if thumb:
|
if thumb:
|
||||||
if not util.is_string(thumb):
|
if not util.is_string(thumb):
|
||||||
files['thumb'] = thumb
|
if files:
|
||||||
|
files['thumb'] = thumb
|
||||||
|
else:
|
||||||
|
files = {'thumb': thumb}
|
||||||
else:
|
else:
|
||||||
payload['thumb'] = thumb
|
payload['thumb'] = thumb
|
||||||
return _make_request(token, method_url, params=payload, files=files, method='post')
|
return _make_request(token, method_url, params=payload, files=files, method='post')
|
||||||
@ -654,7 +666,10 @@ def send_data(token, chat_id, data, data_type, reply_to_message_id=None, reply_m
|
|||||||
payload['caption'] = caption
|
payload['caption'] = caption
|
||||||
if thumb:
|
if thumb:
|
||||||
if not util.is_string(thumb):
|
if not util.is_string(thumb):
|
||||||
files['thumb'] = thumb
|
if files:
|
||||||
|
files['thumb'] = thumb
|
||||||
|
else:
|
||||||
|
files = {'thumb': thumb}
|
||||||
else:
|
else:
|
||||||
payload['thumb'] = thumb
|
payload['thumb'] = thumb
|
||||||
return _make_request(token, method_url, params=payload, files=files, method='post')
|
return _make_request(token, method_url, params=payload, files=files, method='post')
|
||||||
|
Loading…
Reference in New Issue
Block a user