serenity
serenity copied to clipboard
Switch serenity's ratelimiter to a ratelimiting queue instead of returning a sleep duration
My bot sends large numbers of webhooks concurrently that hit Discord ratelimits quite quickly. Serenity's current implementation has them all fire simultaneously when the ratelimit expires, easily resulting in >10k 429s in under 10 minutes, and the dreaded 1 hour Cloudflare ban. I'm hoping this fixes the issue. Currently untested, opening for review.