REST rate-limit event #11350
Closed
InnateAlpaca
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
|
Did you mean |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Alright, after digging a little bit more yes, most of the information I could need is in the errors thrown, if enabled. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, REST is useful for making calls to the discord rest API, as it will handle the rate limits, retries, bucket changes, etc.
The problem with it is that it won't provide information to the developer about the current status of the buckets, the actual rate limits. As a consequence it's impossible to nicely manage rate limits beforehand.
The information about rate-limits is present in the response headers, but REST is stripping it away, so no event actually exposes them. And
rate-limited, is only for when you already hit the limit.I would suggest to add a
rate-limitevent fired at every request with the rate-limit information provided in the headers, so that developers can properly handle a queue before performing requests with REST. In the example above we would make sure to make only the allowed number of requests to an endpoint before limit-reset.Beta Was this translation helpful? Give feedback.
All reactions