#discord-twilight #discord #twilight #discord-api #api-bindings

twilight-http-ratelimiting

Discord REST API ratelimiter implementations for the Twilight ecosystem

28 releases

0.16.0 Jan 12, 2025
0.16.0-rc.1 Feb 21, 2024
0.15.3 Sep 10, 2023
0.15.1 Feb 26, 2023
0.8.2 Dec 25, 2021

#149 in Asynchronous

Download history 12649/week @ 2025-02-02 14238/week @ 2025-02-09 9336/week @ 2025-02-16 20309/week @ 2025-02-23 14804/week @ 2025-03-02 22350/week @ 2025-03-09 14508/week @ 2025-03-16 13926/week @ 2025-03-23 13481/week @ 2025-03-30 16961/week @ 2025-04-06 28271/week @ 2025-04-13 43208/week @ 2025-04-20 21848/week @ 2025-04-27 6821/week @ 2025-05-04 9584/week @ 2025-05-11 11232/week @ 2025-05-18

51,386 downloads per month
Used in 19 crates (2 directly)

ISC license

78KB
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.4–8.5MB
~65K SLoC