readBusinessMessage()
Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
business_connection_id | string | required | Unique identifier of the business connection on behalf of which to read the message |
chat_id | number | required | Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours. |
message_id | number | required | Unique identifier of the message to mark as read |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { ReadBusinessMessageParams } from "@yaebal/types";
await bot.api.call<boolean>("readBusinessMessage", {
business_connection_id: "...",
chat_id: 123456789,
message_id: 1,
} satisfies ReadBusinessMessageParams);context shortcut
also available as ctx.readBusinessMessage() on
10
context types — see @yaebal/contexts.
/** Marks incoming message as read on behalf of a business account. Requires the *can\_read\_messages* business bot right. Returns *True* on success. */
ctx.readBusinessMessage(params: Omit<ReadBusinessMessageParams, "chat_id" | "message_id">)official Bot API docs: https://core.telegram.org/bots/api/#readbusinessmessage