#discord-api #discord #twilight #http-request #api-bindings

twilight-http-ratelimiting

Discord REST API ratelimiter implementations for the Twilight ecosystem

27 releases

0.16.0-rc.1 Feb 21, 2024
0.15.3 Sep 10, 2023
0.15.1 Feb 26, 2023
0.14.0 Nov 14, 2022
0.8.2 Dec 25, 2021

#172 in Asynchronous

Download history 4571/week @ 2024-07-20 4014/week @ 2024-07-27 3936/week @ 2024-08-03 7819/week @ 2024-08-10 9019/week @ 2024-08-17 13955/week @ 2024-08-24 7090/week @ 2024-08-31 10274/week @ 2024-09-07 7552/week @ 2024-09-14 9280/week @ 2024-09-21 17173/week @ 2024-09-28 3476/week @ 2024-10-05 13841/week @ 2024-10-12 8435/week @ 2024-10-19 12401/week @ 2024-10-26 1974/week @ 2024-11-02

37,160 downloads per month
Used in 17 crates (2 directly)

ISC license

77KB
1.5K SLoC

twilight-http-ratelimiting

Ratelimiting functionality for HTTP requests.

Discord ratelimits requests to the HTTP API both globally and per-route. For more information on the specifics, please take a look at Discord's documentation.

This crate provides a common Ratelimiter trait that all ratelimiter implementations need to implement.

It also ships a default implementation, InMemoryRatelimiter, that manages the bucket states in memory.

Dependencies

~2.6–8.5MB
~69K SLoC