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:
parent
10a80e1cfa
commit
ed6d6cc03f
|
@ -17,11 +17,16 @@ def create_poll(message):
|
||||||
chat_id=message.chat.id,
|
chat_id=message.chat.id,
|
||||||
question="We are going to '' park.",
|
question="We are going to '' park.",
|
||||||
options=answer_options,
|
options=answer_options,
|
||||||
type='quiz',
|
type="quiz",
|
||||||
correct_option_id=2,
|
correct_option_id=2,
|
||||||
is_anonymous=False,
|
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()
|
bot.infinity_polling()
|
||||||
|
|
Loading…
Reference in New Issue