Skip to content

v2.15.0

Choose a tag to compare

@FasterSpeeding FasterSpeeding released this 31 May 22:13
· 109 commits to master since this release
5d534fb

2.15.0 - 2023-05-31

Added

  • dependencies.add_cooldown and dependencies.add_concurrency_limit functions which act as non-decorator equivalents of the relevant "with_" functions.
  • AbstractCooldownManager.acquire method which returns an async context manager which acquires and releases a cooldown lock for you.
  • AbstractConcurrencyLimiter.acquire method which returns an async context manager which acquires and releases a concurrency lock for you.
  • System for using custom cooldown bucket implementations with the standard cooldown manager using InMemoryCooldownManager.set_custom_bucket.
  • System for using custom concurrency limiter bucket implementations with the standard concurrency limiter manager using InMemoryConcurrencyLimiter.set_custom_bucket.
  • unknown_message option for CooldownPreExecution.__init__ and with_cooldown for setting the response message specifically for the new case of when wait_until is unknown.

Changed

  • InMemoryCooldownManager now uses a sliding ratelimit approach rather than fixed window. This also now waits until the command call has finished before starting the countdown for expiring that specific call.
  • The datetime passed to with_cooldown's error callback can now also be None when it's unknown.

Deprecated

  • AbstractCooldownManager.check_cooldown and AbstractCooldownManager.increment_cooldown in favour of the AbstractCooldownManager.try_acquire and AbstractCooldownManager.release interfaces.