Return the API global ratelimit #4353
Unanswered
germanoeich
asked this question in
API Feature Requests & Ideas
Replies: 2 comments 1 reply
-
That isn't related to the gateway so it wouldn't fit in the /gateway/bot endpoint |
Beta Was this translation helpful? Give feedback.
1 reply
-
Perhaps discord could take a page from github and add a /rate_limits route that returns the global ratelimit, It would be nice to see this feature, as discord obviously has the data, but not exposed anywhere. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR: Add a field somewhere in the API that contains the global REST ratelimit
I was recently made aware that bots can have varying REST limits outside of big bot sharding.
Previously, the consensus was this: you either have 50/s or you are on big bot sharding. For big bot sharding, you have a 500/s floor and your REST limit is based on this formula:
25 * max_concurrency
. In this manner, libs could calculate the REST limit accurately. Apparently this is not the case anymore (or hasn't been the case for a while and I just wasn't informed).We can fetch max_concurrency from /gateway/bot, however the REST limit is nowhere on the API.
While I agree that this change would affect a very small percent of bots and is easy to add an override for, I'd like to ask, is there any reason we can't get the REST limit from the API? This is something libraries could implement to better support big bots or special cases.
My suggestion would be to add a new field on the /gateway/bot response with the max requests per second your bot can do against the Discord API.
Introducing another endpoint would also be totally fine.
Beta Was this translation helpful? Give feedback.
All reactions