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

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

#129 in Asynchronous

Download history 10317/week @ 2024-11-21 16012/week @ 2024-11-28 16442/week @ 2024-12-05 23816/week @ 2024-12-12 1178/week @ 2024-12-19 316/week @ 2024-12-26 10976/week @ 2025-01-02 19467/week @ 2025-01-09 16535/week @ 2025-01-16 6860/week @ 2025-01-23 11805/week @ 2025-01-30 16055/week @ 2025-02-06 9638/week @ 2025-02-13 18754/week @ 2025-02-20 16646/week @ 2025-02-27 16839/week @ 2025-03-06

66,951 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