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

twilight-http-ratelimiting

Discord REST API ratelimiter implementations for the Twilight ecosystem

28 releases

0.16.0 Jan 12, 2025
0.16.0-rc.1 Feb 21, 2024
0.15.3 Sep 10, 2023
0.15.1 Feb 26, 2023
0.8.2 Dec 25, 2021

#132 in Asynchronous

Download history 8185/week @ 2024-10-20 12361/week @ 2024-10-27 2074/week @ 2024-11-03 26582/week @ 2024-11-10 27682/week @ 2024-11-17 5319/week @ 2024-11-24 22626/week @ 2024-12-01 19293/week @ 2024-12-08 14419/week @ 2024-12-15 313/week @ 2024-12-22 2333/week @ 2024-12-29 19547/week @ 2025-01-05 18454/week @ 2025-01-12 9342/week @ 2025-01-19 10495/week @ 2025-01-26 12567/week @ 2025-02-02

50,975 downloads per month
Used in 21 crates (2 directly)

ISC license

78KB
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.5–9MB
~68K SLoC