Updating messages

editMessageChecklist()

Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.

parameters

parametertyperequireddescription
business_connection_idstringrequiredUnique identifier of the business connection on behalf of which the message will be sent
chat_idnumber | stringrequiredUnique identifier for the target chat or username of the target bot in the format @username
message_idnumberrequiredUnique identifier for the target message
checklistInputChecklistrequiredA JSON-serialized object for the new checklist
reply_markupInlineKeyboardMarkupoptionalA JSON-serialized object for the new inline keyboard for the message

returns

Message

usage in yaebal

editMessageChecklist is directly typed on Api — call it straight off bot.api.

bot.ts
import type { EditMessageChecklistParams } from "@yaebal/types";

await bot.api.editMessageChecklist({
  business_connection_id: "...",
  chat_id: 123456789,
  message_id: 1,
  checklist: {} /* InputChecklist */,
} satisfies EditMessageChecklistParams);

context shortcut

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

context shortcut
/** Use this method to edit a checklist on behalf of a connected business account. On success, the edited [Message](https://core.telegram.org/bots/api/#message) is returned. */
ctx.editMessageChecklist(params: Omit<EditMessageChecklistParams, "business_connection_id" | "chat_id" | "message_id"> & { business_connection_id?: string })