Updating messages

stopPoll()

Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.

parameters

parametertyperequireddescription
business_connection_idstringoptionalUnique identifier of the business connection on behalf of which the message to be edited was sent
chat_idnumber | stringrequiredUnique identifier for the target chat or username of the target bot, supergroup or channel in the format @username
message_idnumberrequiredIdentifier of the original message with the poll
reply_markupInlineKeyboardMarkupoptionalA JSON-serialized object for a new message inline keyboard

returns

Poll

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { Poll, StopPollParams } from "@yaebal/types";

await bot.api.call<Poll>("stopPoll", {
  chat_id: 123456789,
  message_id: 1,
} satisfies StopPollParams);

context shortcut

also available as ctx.stopPoll() on 10 context types — see @yaebal/contexts.

context shortcut
/** 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">)