如果用户创建的民意调查,如何使用 aiogram 3.x 获取投票结果

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

提问人:zenondd 提问时间:11/7/2023 更新时间:11/7/2023 访问量:32

问:

如果民意调查是由用户创建的,而不是由机器人创建的,有没有办法使用 aiogram 获取投票答案。现在我有工作代码:

@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)

在机器人使用适当的命令 /poll 进行轮询创建时,它效果很好。但是,一旦用户机器人手动创建的民意调查就永远不会从中得到答案。

我需要能够从其用户在公共组中创建的整个民意调查中获得结果。

python -机器人 aiogram

评论


答: 暂无答案