Just submitted for bot whitelist. Still have questions though!

We do whitelist very popular bots (whitelist = higher rate limits).

In general, for rate limits you want to implement what is called a “sliding window”. What you do, is have a sorted set of items sorted by time. Then, when sending a message you check how many items were sent within that time period, and decide to remove that item and send it, or wait to send.

What @3ventic said about just waiting a set period of ms between messages works as well (albeit doesn’t allow for bursts of messages within a period). If you don’t expect to send more than 1 message per 1.5 seconds, then this is the easiest thing to implement.

1 Like