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
readBusinessMessage is directly typed on Api — call it straight off bot.api.
import type { ReadBusinessMessageParams } from "@yaebal/types";
await bot.api.readBusinessMessage({
business_connection_id: "...",
chat_id: 123456789,
message_id: 1,
} satisfies ReadBusinessMessageParams);context shortcut
also available as ctx.readBusinessMessage() on
3
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, "business_connection_id" | "chat_id" | "message_id"> & { business_connection_id?: string })official Bot API docs: https://core.telegram.org/bots/api/#readbusinessmessage