#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

#162 in Asynchronous

Download history 5138/week @ 2024-07-04 2696/week @ 2024-07-11 3717/week @ 2024-07-18 3075/week @ 2024-07-25 3811/week @ 2024-08-01 7717/week @ 2024-08-08 5748/week @ 2024-08-15 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 11686/week @ 2024-10-17

45,592 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.6–8.5MB
~69K SLoC