stopPoll¶
Returns: Poll
- class aiogram.methods.stop_poll.StopPoll(*, chat_id: int | str, message_id: int, business_connection_id: str | None = None, reply_markup: InlineKeyboardMarkup | None = 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: 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
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
- business_connection_id: str | None¶
Unique identifier of the business connection on behalf of which the message to be edited was sent
- reply_markup: InlineKeyboardMarkup | None¶
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(...)