Skip to content
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

sendPoll and numbering of the options #234

Open
minigo opened this issue Oct 5, 2022 · 1 comment
Open

sendPoll and numbering of the options #234

minigo opened this issue Oct 5, 2022 · 1 comment

Comments

@minigo
Copy link

minigo commented Oct 5, 2022

Code:
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);

If i set the correct correct_answer value to 0 or 4 i get an error - error: Bad Request: wrong correct option ID specified.

llnulldisk added a commit to llnulldisk/tgbot-cpp that referenced this issue Oct 5, 2022
@llnulldisk
Copy link
Contributor

Thanks! If you set the value to 4, an error should appear, because you don't have 5 options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants