How to get poll results with aiogram 3.x if the poll created by user

140 Views Asked by At

Is there a way to get poll answers with aiogram if poll created by user but not by the bot. Now I have working code:

@rt.message(Command("poll"))
async def poll(msg: Message, bot: Bot):
    await bot.send_poll(
        chat_id=msg.chat.id,
        question='Example question',
        options=['1', '2'],
        type='regular',
        is_anonymous=False,
        allows_multiple_answers=True
        )


@rt.poll_answer()
async def poll_res(pa: PollAnswer):
    print(pa.option_ids, pa.user.id)

It works great while poll creating by bot with appropriate command /poll. But once the poll created manually by user bot never get answers from it.

I need to be able to get results from the whole polls created in public group by its users.

0

There are 0 best solutions below