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

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

#119 in Asynchronous

Download history 534/week @ 2023-12-23 3589/week @ 2023-12-30 4543/week @ 2024-01-06 3874/week @ 2024-01-13 7777/week @ 2024-01-20 4657/week @ 2024-01-27 6074/week @ 2024-02-03 8154/week @ 2024-02-10 1843/week @ 2024-02-17 8131/week @ 2024-02-24 3225/week @ 2024-03-02 7361/week @ 2024-03-09 6658/week @ 2024-03-16 10051/week @ 2024-03-23 14151/week @ 2024-03-30 2101/week @ 2024-04-06

34,737 downloads per month
Used in 16 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–4MB
~69K SLoC