tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

user-bot rate limit #2845

Closed gorefieend closed 5 months ago

gorefieend commented 6 months ago

hello,

how often can i call function get_Messages() go manually poll for a new messages as user in supergroup?

every 50ms? every 100ms? 500ms?

levlam commented 6 months ago

You must not call getMessages to get new messages in a supergroup. All new messages in joined or opened chats are received from TDLib in updates.

ne0c0de commented 6 months ago

sometimes Telegram lacks on sending new messages on heavy groups (which has 10k+ users) so calling getMessages is a good way to get news messages but it has limits to call for every X ms. I guess @gorefieend is asking what's the best interval to call this method in order to avoid ban.

levlam commented 6 months ago

There is no such interval. Apps are not supposed to call getMessages with identifiers of non-existent messages.

gorefieend commented 6 months ago

@ne0c0de exactly!!

what is the max possible interval without getting limited? in ms

Tidalikk commented 6 months ago

@gorefieend Have you found any documentation about the api limit?

gorefieend commented 6 months ago

nope. it is not public