From af77e03a461dba3b153cfc6f60be4dbd82712141 Mon Sep 17 00:00:00 2001 From: alina sireneva Date: Wed, 12 Jun 2024 19:02:48 +0300 Subject: [PATCH] docs(core): added note on limits in `openChat` method --- packages/core/src/highlevel/methods/chats/open-chat.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/src/highlevel/methods/chats/open-chat.ts b/packages/core/src/highlevel/methods/chats/open-chat.ts index addd8a08..fdb6a807 100644 --- a/packages/core/src/highlevel/methods/chats/open-chat.ts +++ b/packages/core/src/highlevel/methods/chats/open-chat.ts @@ -10,6 +10,10 @@ import { resolvePeer } from '../users/resolve-peer.js' * Some library logic depends on this, for example, the library will * periodically ping the server to keep the updates flowing. * + * > **Warning**: Opening a chat with `openChat` method will make the library make additional requests every so often. + * > Which means that you should **avoid opening more than 5-10 chats at once**, as it will probably trigger + * > server-side limits and you might start getting transport errors or even get banned. + * * @param chat Chat to open */ export async function openChat(client: ITelegramClient, chat: InputPeerLike): Promise {