1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Added thumb parameter to send_video

This commit is contained in:
Kwisatz Haderach 2020-06-23 20:17:21 +02:00 committed by GitHub
parent 53ccef5e5e
commit 99de5490a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -435,7 +435,7 @@ def send_chat_action(token, chat_id, action, timeout=None):
def send_video(token, chat_id, data, duration=None, caption=None, reply_to_message_id=None, reply_markup=None,
parse_mode=None, supports_streaming=None, disable_notification=None, timeout=None):
parse_mode=None, supports_streaming=None, disable_notification=None, timeout=None, thumb=None):
method_url = r'sendVideo'
payload = {'chat_id': chat_id}
files = None
@ -459,6 +459,11 @@ def send_video(token, chat_id, data, duration=None, caption=None, reply_to_messa
payload['disable_notification'] = disable_notification
if timeout:
payload['connect-timeout'] = timeout
if thumb:
if not util.is_string(thumb):
files['thumb'] = thumb
else:
payload['thumb'] = thumb
return _make_request(token, method_url, params=payload, files=files, method='post')