docs(core): added note on limits in openChat method

This commit is contained in:
alina 🌸 2024-06-12 19:02:48 +03:00
parent 09c2122a6d
commit af77e03a46
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -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<void> {