1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-09 23:39:50 +00:00

[commands] Allow passing reference time to update_rate_limit

This commit is contained in:
Rapptz 2019-04-14 16:57:47 -04:00
parent 9b089c9a7b
commit ec7a701ceb

@ -61,8 +61,8 @@ class Cooldown:
tokens = self.rate
return tokens
def update_rate_limit(self):
current = time.time()
def update_rate_limit(self, current=None):
current = current or time.time()
self._last = current
self._tokens = self.get_tokens(current)