Skip to content

discohook.ratelimit

Classes

Bucket

discohook.ratelimit.Bucket

A dataclass that represents a rate limit bucket.

RatelimitMux

discohook.ratelimit.RatelimitMux

A protocol that defines the methods and properties of a rate limit bucket.

Inheritance

  • typing.Protocol

Method Index

Methods

get

python
async get(self, path: str) -> discohook.ratelimit.Bucket | None

Get the rate limit bucket for the given path.

is_rate_limited

python
async is_rate_limited(self, path: str) -> bool

Check if the rate limit bucket for the given path is rate limited.

reset

python
async reset(self, path: str) -> None

Reset the rate limit bucket for the given path.