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

twilight-http-ratelimiting

Discord REST API ratelimiter implementations for the Twilight ecosystem

27 releases

0.16.0-rc.1 Feb 21, 2024
0.15.3 Sep 10, 2023
0.15.1 Feb 26, 2023
0.14.0 Nov 14, 2022
0.8.2 Dec 25, 2021

#185 in Asynchronous

Download history 13730/week @ 2024-08-22 9066/week @ 2024-08-29 9942/week @ 2024-09-05 6576/week @ 2024-09-12 10194/week @ 2024-09-19 17694/week @ 2024-09-26 5326/week @ 2024-10-03 10416/week @ 2024-10-10 11722/week @ 2024-10-17 7255/week @ 2024-10-24 8634/week @ 2024-10-31 5329/week @ 2024-11-07 43925/week @ 2024-11-14 10317/week @ 2024-11-21 16022/week @ 2024-11-28 12779/week @ 2024-12-05

86,648 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

~2.5–8.5MB
~68K SLoC