mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-17 03:09:05 +00:00
[commands] Remove window reassignment when tokens reach 0
This commit is contained in:
parent
c748e4bce5
commit
d047cebc35
@ -115,11 +115,6 @@ class Cooldown:
|
|||||||
# we're not so decrement our tokens
|
# we're not so decrement our tokens
|
||||||
self._tokens -= 1
|
self._tokens -= 1
|
||||||
|
|
||||||
# see if we got rate limited due to this token change, and if
|
|
||||||
# so update the window to point to our current time frame
|
|
||||||
if self._tokens == 0:
|
|
||||||
self._window = current
|
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
self._tokens = self.rate
|
self._tokens = self.rate
|
||||||
self._last = 0.0
|
self._last = 0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user