add poll answer handler to poll_example.py to show the example to send next poll or log user answers

This commit is contained in:
Muhammad Aadil 2023-02-04 11:22:49 +05:00
parent 10a80e1cfa
commit ed6d6cc03f
1 changed files with 6 additions and 1 deletions

View File

@ -17,11 +17,16 @@ def create_poll(message):
chat_id=message.chat.id,
question="We are going to '' park.",
options=answer_options,
type='quiz',
type="quiz",
correct_option_id=2,
is_anonymous=False,
)
@bot.poll_answer_handler()
def handle_poll(poll):
# This handler can be used to log User answers and to send next poll
pass
bot.infinity_polling()