All tools / Errors

X-RateLimit header parser

Parse X-RateLimit-Limit, Remaining, Reset, Reset-After, Bucket, Scope, and Retry-After headers into a wait time.

Bucket, not route

Discord sends rate-limit headers on most responses, not just 429s. Remaining 0 means wait Reset-After seconds. X-RateLimit-Bucket groups routes that share a limit, keyed together with the top-level channel, guild, or webhook id. X-RateLimit-Scope on a 429 says whether it was your user, global, or a shared resource limit.

Related: 429 rate limit explainer · X-Audit-Log-Reason header encoder