From 99de5490a05ffcbd63fefb1d97d696387231c7d0 Mon Sep 17 00:00:00 2001 From: Kwisatz Haderach <38349702+Otxoto@users.noreply.github.com> Date: Tue, 23 Jun 2020 20:17:21 +0200 Subject: [PATCH] Added thumb parameter to send_video --- telebot/apihelper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/telebot/apihelper.py b/telebot/apihelper.py index 93ba91a..c4ab906 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -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')