Concurrent rate limiter for Discord REST API.
The GenServer acts as a coordinator — it never executes HTTP requests itself.
It manages bucket state, a priority queue, and global rate limit tracking.
Callers block on GenServer.call until the coordinator replies :ok,
then execute the HTTP request in their own process (parallel).
Priority levels
:urgent(0) — bans, kicks, bulk-ban:normal(1) — messages, edits (default):low(2) — reads, gets
Summary
Functions
Returns a specification to start this module under a supervisor.
Queues a request and executes fun when the rate limit allows.
Reports response headers to update bucket state.
Reports a 429 rate limit response.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Queues a request and executes fun when the rate limit allows.
The caller blocks until it receives permission, then fun.() runs
in the caller's process. Handles 429 retries automatically.
Options
:priority—:urgent,:normal(default), or:low
Reports response headers to update bucket state.
Reports a 429 rate limit response.