-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Describe the ratelimit for each operation #23
Comments
I agree! |
AFAIK, there is actually 3 different buckets on this endpoint:
This is a perfect example of why such exceptions should be documented somehow. |
Ive updated the age based bucketing suggestion to support any number of categories. I figured that using nested ternaries would be hard to consume so I think just listing the boundaries of each range would be better |
@Zoddo Just separate buckets, or does the window period also change? |
To avoid hitting ratelimits, a library needs to be able to guess, with some degree of confidence, which bucket a request will fall into before making the request. Most libraries do this by messing around with the URL+Method being requested to get a local bucket id, and using that to point to a real bucket id once the first request has been made. It would be useful if the method of getting that initial local bucket id would be something that can be worked out from the spec. Perhaps something like:
Some issues with this that I can see are:
"DELETE /channels/{channel_id}/messages/{message_id:age(10000,1209600000)}"
(Split the age using 2 boundaries into 3 buckets -age < 10s
,10s <= age < 2 weeks
,2 weeks <= age
). That could then be reused if discord ever adds a similar age-based ratelimit split for another endpoint in the futureThe text was updated successfully, but these errors were encountered: