[commands] Fix issue with decorator order with checks and cooldowns

Now they're just explicitly copied.
This commit is contained in:
Rapptz
2019-02-23 07:41:25 -05:00
parent 10ed41d8a0
commit 9827d6eeaf
2 changed files with 9 additions and 0 deletions

View File

@ -98,6 +98,11 @@ class CooldownMapping:
self._cache = {}
self._cooldown = original
def copy(self):
ret = CooldownMapping(self._cooldown)
ret._cache = self._cache.copy()
return ret
@property
def valid(self):
return self._cooldown is not None