X-RateLimit-Limit - The number of requests that can be made
X-RateLimit-Remaining - The number of remaining requests that can be made
X-RateLimit-Reset - Epoch time (seconds since 00:00:00 UTC on January 1, 1970) at which the rate limit resets
X-RateLimit-Reset-After - Total time (in seconds) of when the current rate limit bucket will reset. Can have decimals to match previous millisecond ratelimit precision
X-RateLimit-Bucket - A unique string denoting the rate limit being encountered (non-inclusive of top-level resources in the path)
X-RateLimit-Global - Returned only on HTTP 429 responses if the rate limit encountered is the global rate limit (not per-route)
X-RateLimit-Scope - Returned only on HTTP 429 responses. Value can be user (per bot or user limit), global (per bot or user global limit), or shared (per resource limit)
Acceptance Criteria
WHEN make a request to discord
THEN we should read the headers to handle rate limiting for the next request
As a user I want to...
be able to send requests to discord at the rate they allow
So that...
I am not rate limited or be imposed by discord.
Context
At the moment we are handling rate limiting by not allowing more than 50 requests per second. This is actually incorrect according to the discord documentation: https://discord.com/developers/docs/topics/rate-limits#rate-limits
Headers we receive:
From the docs:
Acceptance Criteria
WHEN make a request to discord THEN we should read the headers to handle rate limiting for the next request