diff --git a/telebot/apihelper.py b/telebot/apihelper.py index 8a6ae75..93ba91a 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -541,7 +541,7 @@ def send_video_note(token, chat_id, data, duration=None, length=None, reply_to_m def send_audio(token, chat_id, audio, caption=None, duration=None, performer=None, title=None, reply_to_message_id=None, - reply_markup=None, parse_mode=None, disable_notification=None, timeout=None): + reply_markup=None, parse_mode=None, disable_notification=None, timeout=None, thumb=None): method_url = r'sendAudio' payload = {'chat_id': chat_id} files = None @@ -567,6 +567,11 @@ def send_audio(token, chat_id, audio, caption=None, duration=None, performer=Non 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')