tdlib / td

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

Creating groupchats #2682

Closed WlinkNET closed 9 months ago

WlinkNET commented 10 months ago

Hello,

I have logic for support chats so basically when user need support they will trigger comand /ticket So in the background real user via tdlib listen and create special basicgroup then increase to supergroup and send invite link. Issue is that if users trigger too often that command tdlib will trigger flood_wait rate limit

So my needs is in approx 50-70 chats daily how can I make logic to stay below that rate limit And when I trigger limit it will get me 2hr timeout.

So question is how many chats I can create per minute or hour to avoid rate limit ? Also if Include setChatPhoto its worse then I cant create more then 2-3 chat per minute

Thanks in advance

levlam commented 10 months ago

You can't create so many chats. 50 chats daily is an extremely big amount. This way you not only exceed daily limits, by also exceed the total limit on the number of supergroups for a user in a few days. You must use a forum and create topics there via bot instead.

WlinkNET commented 10 months ago

Well it will not stay open maybe let say 5 daily will stay open. Others it will be temporary group where participants will be client and agent and nobody else its kind sensitive info there need to be shared if you get me. So if I can open forum and topics for each one as private can you give me some links how to use it thanks

levlam commented 10 months ago

The forum must be accessible only to the administrator and the bot, users must send messages to the bot and receive responses from the bot. Everything can be implememnted using https://core.telegram.org/bots/api.

WlinkNET commented 10 months ago

I understand this but this is not what I need to do because we can't restrict others to not see that topic and support ticket is something what we want to discuss on private with client which provide command for support. There is only to hide general but not topic... Any other solution?

levlam commented 10 months ago

There is no need to create group chats to discuss something in private.