Library Exceptions#

All exceptions inherit from BaseCooldownException

class cooldowns.exceptions.BaseCooldownException(*args)#

A base exception handler.

class cooldowns.exceptions.NonExistent(*args)#

There doesnt already exist a bucket for this.

class cooldowns.exceptions.CooldownAlreadyExists(*args)#

A Cooldown with this ID already exists.

class cooldowns.exceptions.UnknownBucket(*args)#

Failed to process the bucket.

class cooldowns.exceptions.NoRegisteredCooldowns#

This Callable has no attached cooldown’s.

class cooldowns.exceptions.CallableOnCooldown(func: Callable, cooldown: Cooldown, resets_at: datetime.datetime)#

This Callable is currently on cooldown.

func#

The Callable which is currently rate-limited

Type:

Callable

cooldown#

The Cooldown which applies to the current cooldown

Type:

Cooldown

resets_at#

The exact datetime this cooldown resets.

Type:

datetime.datetime

property retry_after: float#

How many seconds before you can retry the Callable

Returns:

How many seconds before you can retry this

Note

This will be 0 if you can retry now

Return type:

float