stopPoll#
Returns: Poll
- class aiogram.methods.stop_poll.StopPoll(*, chat_id: Union[int, str], message_id: int, reply_markup: Optional[InlineKeyboardMarkup] = None, **extra_data: Any)[source]#
Use this method to stop a poll which was sent by the bot. On success, the stopped
aiogram.types.poll.Poll
is returned.Source: https://core.telegram.org/bots/api#stoppoll
- chat_id: Union[int, str]#
Unique identifier for the target chat or username of the target channel (in the format
@channelusername
)
- message_id: int#
Identifier of the original message with the poll
- reply_markup: Optional[InlineKeyboardMarkup]#
A JSON-serialized object for a new message inline keyboard.
Usage#
As bot method#
result: Poll = await bot.stop_poll(...)
Method as object#
Imports:
from aiogram.methods.stop_poll import StopPoll
alias:
from aiogram.methods import StopPoll
With specific bot#
result: Poll = await bot(StopPoll(...))
As reply into Webhook in handler#
return StopPoll(...)