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

Poll Answers #1244

Open
SaMssasd opened this issue Jul 6, 2023 · 1 comment
Open

Poll Answers #1244

SaMssasd opened this issue Jul 6, 2023 · 1 comment

Comments

@SaMssasd
Copy link

SaMssasd commented Jul 6, 2023

How can i get to know which options were selected in a poll (non anonymus and with multiple options enabled).
I don't even need to know how often they were voted for just if they were voted for at least once, so that i can work woth that.

My poll:
SendPoll poll = new SendPoll(update.getMessage().getChatId().toString(), "myQuestion", OP());
poll.setAllowMultipleAnswers(allowMultipleAnswers);
poll.setIsAnonymous(false);
try{
execute(poll);
}catch (TelegramApiException e){
// TODO Auto-generated catch block
e.printStackTrace();
}

@NaveenB2004
Copy link

You need to listen to the bot updates and filter if it's a poll update. If it's a poll, you can identify it using id, Unique poll identifier (see Poll). When you send the poll (as you mentioned above), store the return id of the poll. It will help you when it comes to identification processes (see SendPoll).

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