#discord #discord-api #twilight

twilight-http-ratelimiting

Discord REST API ratelimiter implementations for the Twilight ecosystem

26 releases

0.15.3 Sep 10, 2023
0.15.1 Feb 26, 2023
0.14.0 Nov 14, 2022
0.12.1 Jul 26, 2022
0.8.2 Dec 25, 2021

#128 in Asynchronous

Download history 1849/week @ 2023-07-28 2207/week @ 2023-08-04 2575/week @ 2023-08-11 2251/week @ 2023-08-18 2047/week @ 2023-08-25 1437/week @ 2023-09-01 1804/week @ 2023-09-08 2471/week @ 2023-09-15 2442/week @ 2023-09-22 6810/week @ 2023-09-29 6463/week @ 2023-10-06 13947/week @ 2023-10-13 4517/week @ 2023-10-20 14487/week @ 2023-10-27 8676/week @ 2023-11-03 6827/week @ 2023-11-10

35,549 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

~3.5–5.5MB
~91K SLoC