'How to get the result of send_poll aiogram
there is a code for creating a vote
update_id: m = await bot.send_poll(chat_id = message.chat.id, question='киккнуть', options=['Да', 'Нет'], is_anonymous = True, open_period=10)
I want to get votes, I have a code, but for some reason the votes are not being obtained
a = update_id.poll.options
print(a)
ret = 0
ret2 = 0
for answer in a:
if answer.text == 'Да':
if answer.voter_count == 0:
ret = ret + 1
print('ret1', ret)
if answer.text == 'Нет':
if answer.voter_count == 0:
ret2 = ret2 + 1
print('ret2', ret)
help please
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
