Add "rest.retryWithDelay()" function?
breezemight opened this issue · 4 comments
if my program restarts immediately after reaching the text per minute webhook limit, will disgoorg automatically wait after the restart to send the messages or will it just throw a 429 error?
If it throws 429 error, what's the workaround?
Probably a func that can wait for a specified time between requests?
DisGo tracks the ratelimits via discords headers and delyas requests. It should nearly never hit a 429. Some 429 are unavoidable but it will retry the request 10 times by default before cancelling it.
Can confirm it does sometimes. Happened once today(after an immediate reboot of program aforementioned) and disgo errored out without handling it. So I added a retry logic with delay.
Discord sends you a time to wait for with the 429. So instead of retrying back to back 10 times. Maybe waiting for few seconds would do.
on immediate reboot that can happen as disgo doesn't know the headers yet
I'll investigate why it didnt retry 👍🏻