#discord #discord-api #twilight

twilight-http-ratelimiting

Discord REST API ratelimiter implementations for the Twilight ecosystem

23 releases (7 breaking)

new 0.15.0 Feb 5, 2023
0.14.2 Jan 20, 2023
0.14.0 Nov 14, 2022
0.12.1 Jul 26, 2022
0.8.2 Dec 25, 2021

#129 in Asynchronous

Download history 265/week @ 2022-10-18 535/week @ 2022-10-25 445/week @ 2022-11-01 620/week @ 2022-11-08 709/week @ 2022-11-15 470/week @ 2022-11-22 339/week @ 2022-11-29 336/week @ 2022-12-06 404/week @ 2022-12-13 355/week @ 2022-12-20 512/week @ 2022-12-27 792/week @ 2023-01-03 554/week @ 2023-01-10 620/week @ 2023-01-17 502/week @ 2023-01-24 667/week @ 2023-01-31

2,525 downloads per month
Used in 14 crates (2 directly)

ISC license

76KB
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–8.5MB
~131K SLoC