stopPoll()
Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
parameters
| parameter | type | required | description |
|---|---|---|---|
business_connection_id | string | optional | Unique identifier of the business connection on behalf of which the message to be edited was sent |
chat_id | number | string | required | Unique identifier for the target chat or username of the target bot, supergroup or channel in the format @username |
message_id | number | required | Identifier of the original message with the poll |
reply_markup | InlineKeyboardMarkup | optional | A JSON-serialized object for a new message inline keyboard |
returns
usage in yaebal
stopPoll is directly typed on Api — call it straight off bot.api.
import type { StopPollParams } from "@yaebal/types";
await bot.api.stopPoll({
chat_id: 123456789,
message_id: 1,
} satisfies StopPollParams);context shortcut
also available as ctx.stopPoll() on
10
context types — see @yaebal/contexts.
/** Use this method to stop a poll which was sent by the bot. On success, the stopped [Poll](https://core.telegram.org/bots/api/#poll) is returned. */
ctx.stopPoll(params: Omit<StopPollParams, "chat_id" | "message_id">)official Bot API docs: https://core.telegram.org/bots/api/#stoppoll