Skip to content

Commit

Permalink
2.3.5
Browse files Browse the repository at this point in the history
* fix: incorrect params used in _get_bucket partial

* docs: changelog for previous commit

* chore: version bump
  • Loading branch information
null-domain authored Dec 8, 2023
1 parent 2215c5b commit 8861c4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/source/changelogs/v2-changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Below are all the changelogs for the stable versions of hikari-lightbulb (versio

----

Version 2.3.5
=============

- Fix incorrect parameters being passed to _get_bucket which prevented the add_cooldown decorator from functioning correctly.

Version 2.3.4
=============

Expand Down
2 changes: 1 addition & 1 deletion lightbulb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,4 @@
from lightbulb.parser import *
from lightbulb.plugins import *

__version__ = "2.3.4"
__version__ = "2.3.5"
6 changes: 3 additions & 3 deletions lightbulb/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ def _get_bucket(
ctx: context.base.Context,
_bucket: t.Type[buckets.Bucket],
_length: float,
_max_usages: int,
_uses: int,
_algorithm: t.Type[cooldown_algorithms.CooldownAlgorithm],
) -> buckets.Bucket:
return _bucket(_length, _max_usages, _algorithm)
return _bucket(_length, _uses, _algorithm)

getter = functools.partial(_get_bucket, b=bucket, l=length, u=uses, a=algorithm)
getter = functools.partial(_get_bucket, _bucket=bucket, _length=length, _uses=uses, _algorithm=algorithm)
elif callback is not None:
getter = callback
else:
Expand Down

0 comments on commit 8861c4e

Please sign in to comment.