RequestPoll¶
RequestPoll is a single reply keyboard button that asks the user to create a poll and send it to the bot.
The button requires a text label. Optional parameter includes poll_type to specify type of the poll.
Code example:
from aiogram_dialog.widgets.kbd import RequestPoll
from aiogram_dialog.widgets.text import Const
# Regular poll
poll_btn = RequestPoll(
text=Const("Create Poll"),
)
# Quiz poll
quiz_btn = RequestPoll(
text=Const("Create Quiz"),
poll_type="quiz",
)
Result: