#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

#134 in Asynchronous

Download history 12291/week @ 2024-10-28 2082/week @ 2024-11-04 26564/week @ 2024-11-11 27691/week @ 2024-11-18 5399/week @ 2024-11-25 22580/week @ 2024-12-02 19628/week @ 2024-12-09 14004/week @ 2024-12-16 324/week @ 2024-12-23 2446/week @ 2024-12-30 19680/week @ 2025-01-06 18301/week @ 2025-01-13 9331/week @ 2025-01-20 10595/week @ 2025-01-27 12617/week @ 2025-02-03 14261/week @ 2025-02-10

46,929 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–10MB
~67K SLoC