Extra things#

cooldowns.utils.MaybeCoro#

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

alias of Callable[[Any, Any], Coroutine[Any, Any, Any]]

cooldowns.utils.COOLDOWN_ID#

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

alias of Union[int, str]

cooldowns.utils.default_check = <function default_check>#
class cooldowns.persistence.State(*args, **kwargs)#
cache: Dict[str, CTPState]#
cooldown_id: int | str | None#
limit: int#
pending_reset: bool#
time_period: float#
class cooldowns.persistence.CTPState(*args, **kwargs)#
current: int#
limit: int#
next_reset: List[float]#
time_period: float#