group-butler / GroupButler

This bot can help you in managing your group with rules, anti-flood, description, custom triggers, and much more!
https://t.me/GroupButler_bot
GNU General Public License v2.0
442 stars 295 forks source link

About handling rate limits and queueing #417

Open yangm97 opened 5 years ago

yangm97 commented 5 years ago

This issue is mainly about two things:

  1. handling rate limits imposed by telegram
  2. pass them into users

1. should get rid of severe consequences (such as not sending updates) imposed by telegram for not handling rate limits on methods such as getChatAdministrators, editMessage, etc.

2. should allow us to get rid of the annoying global old_update check, by at least pushing it into time sensitive commands, such as antiflood, which is currently broken #403. Rate limiting users does not only handle situations such as returning from an extended downtime but also deals with users spamming commands and so on.

https://telegra.ph/So-your-bot-is-rate-limited-01-26

https://www.binpress.com/rate-limiting-with-redis-1/