-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User's choise in sendPoll #235
Comments
Thanks! You can now add a listener with onPoll or with onPollAnswer depending on which Update object you need |
What conditions does the handler onPollAnswer work? In my project onPoll work everytime, onPollAnswer - never |
As stated in the docs, onPollAnswer fires, if someone answers the poll or if someone changes the answer in the poll sent by the bot. onPoll refers to the status of the poll itself and gives an update if the poll is closed with closePoll, for example. I tested it locally and can confirm that it works as intended. In case you encounter a different behaviour, could you provide a minimal code snippet to reproduce your problem? |
Creation:
Sending: std::vector<std::string> options = {"1","2","3","4"};
_bot->getApi ().sendPoll (message->chat->id,
"Answers",
options,
false,
0,
std::make_shared<TgBot::GenericReply> (),
true,
"quiz",
false,
correct_answer,
explanation); |
onPollAnswer:
Does it help if you set |
Thank you very much! Work great! |
How to know about the user's choice, whether he chose the correct answer or not?
The text was updated successfully, but these errors were encountered: