p-hennessy / Bolt

All the parts for building a Discord robot
https://docs.bolt.bot/
MIT License
8 stars 6 forks source link

Refactor ratelimiting decorator to allow respect when rate limit has been exceeded. Add max retries #110

Closed p-hennessy closed 4 years ago

p-hennessy commented 4 years ago

It is possible to hit a rate limit by restarting the bot quickly since this decorator assumed that a method would be limit on it's next call if it was too fast.

This handle both cases now so we should not see any rate limits unless I'm not considering another edge case.