RESTRateLimiter¶
Description¶
Discord REST API rate limits implementation. The current implementation only catches some of the most common rate limits, and needs more testing.
Properties¶
type | name |
---|---|
bool | global |
int | retry_after |
int | global_reset |
int | last_latency_ms |
HTTPConnectionPool | pool |
Methods¶
return type | signature |
---|---|
HTTPResponse | queue_request ( RestRequest request ) coroutine |
Constants¶
Property Descriptions¶
-
bool global
Whether we got a global rate limit.
-
int retry_after
There is currently no description for this property.
-
int global_reset
The time in engine ticks millisecond when the global rate limit resets. Irrelevant if
global
isfalse
.
-
int last_latency_ms
There is currently no description for this property.
-
HTTP connection pool reference if enabled.
Method Descriptions¶
-
RESTRateLimiter RESTRateLimiter ( bool use_pool=false )
Constructs a new rate limiter.
use_pool
enables the use of HTTP connection pool (experimental unstable feature).
-
HTTPResponse queue_request ( RestRequest request ) coroutine
Queue a request for rate limiting.