getUserPersonalChatMessages()
Use this method to get the last messages from the personal chat (i.e., the chat currently added to their profile) of a given user. On success, an array of Message objects is returned.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | Unique identifier for the target user |
limit | number | required | The maximum number of messages to return; 1-20 |
returns
Message[]
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { GetUserPersonalChatMessagesParams, Message } from "@yaebal/types";
await bot.api.call<Message[]>("getUserPersonalChatMessages", {
user_id: 123456789,
limit: 1,
} satisfies GetUserPersonalChatMessagesParams);context shortcut
also available as ctx.getUserPersonalChatMessages() on
16
context types — see @yaebal/contexts.
/** Use this method to get the last messages from the personal chat (i.e., the chat currently added to their profile) of a given user. On success, an array of [Message](https://core.telegram.org/bots/api/#message) objects is returned. */
ctx.getUserPersonalChatMessages(params: Omit<GetUserPersonalChatMessagesParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#getuserpersonalchatmessages