#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

#123 in Asynchronous

Download history 7882/week @ 2024-01-22 4580/week @ 2024-01-29 6464/week @ 2024-02-05 7705/week @ 2024-02-12 1905/week @ 2024-02-19 8315/week @ 2024-02-26 3026/week @ 2024-03-04 7605/week @ 2024-03-11 6451/week @ 2024-03-18 11533/week @ 2024-03-25 12695/week @ 2024-04-01 3012/week @ 2024-04-08 4931/week @ 2024-04-15 4850/week @ 2024-04-22 5334/week @ 2024-04-29 2614/week @ 2024-05-06

17,798 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
~69K SLoC