#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

#126 in Asynchronous

Download history 5924/week @ 2024-01-25 5126/week @ 2024-02-01 10055/week @ 2024-02-08 2075/week @ 2024-02-15 4487/week @ 2024-02-22 6333/week @ 2024-02-29 6612/week @ 2024-03-07 8097/week @ 2024-03-14 2781/week @ 2024-03-21 19831/week @ 2024-03-28 3726/week @ 2024-04-04 5090/week @ 2024-04-11 5086/week @ 2024-04-18 4948/week @ 2024-04-25 3494/week @ 2024-05-02 2366/week @ 2024-05-09

16,865 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–4MB
~70K SLoC