diff --git a/bot/utils/cooldown.py b/bot/utils/cooldown.py index 47bb29b..d997cf5 100644 --- a/bot/utils/cooldown.py +++ b/bot/utils/cooldown.py @@ -30,7 +30,7 @@ def throttle(cooldown: int = 5, by_id: bool = True, admin_ids: list = None): if not last_time: last_time = delta - if last_time <= delta: + if last_time <= delta or user_id in admin_ids: try: f_name_dict = db[DBTables.cooldown][func.__name__] f_name_dict[user_id] = now @@ -42,7 +42,7 @@ def throttle(cooldown: int = 5, by_id: bool = True, admin_ids: list = None): try: return asyncio.create_task(func(*args, **kwargs)) except Exception as e: - assert e + assert e else: return not_allowed(*args, cooldown, by_id)