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

Polls are updated to the latest API state.

Polls are updated to the latest API state.

Minor code refactoring.
This commit is contained in:
Badiboy
2020-04-25 22:22:08 +03:00
parent aac9ce45a3
commit bb4f6a7190
4 changed files with 97 additions and 43 deletions

View File

@@ -1208,7 +1208,7 @@ class TeleBot:
disable_notification, reply_to_message_id, reply_markup, provider_data)
return types.Message.de_json(result)
def send_poll(self, chat_id, poll, disable_notifications=False, reply_to_message=None, reply_markup=None):
def send_poll(self, chat_id, poll, explanation_parse_mode=None, disable_notifications=False, reply_to_message=None, reply_markup=None):
"""
Sends poll
:param chat_id:
@@ -1218,7 +1218,7 @@ class TeleBot:
:param reply_markup:
:return:
"""
return types.Message.de_json(apihelper.send_poll(self.token, chat_id, poll.question, poll.options, disable_notifications, reply_to_message, reply_markup))
return types.Message.de_json(apihelper.send_poll(self.token, chat_id, poll, explanation_parse_mode, disable_notifications, reply_to_message, reply_markup))
def stop_poll(self, chat_id, message_id):
"""