From 214a45dc527b3a6010f9e23284ec62c966acc353 Mon Sep 17 00:00:00 2001 From: Myned Date: Thu, 16 Mar 2023 03:09:03 -0500 Subject: [PATCH] Fix sub-60 second role updates --- tasks/activity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/activity.py b/tasks/activity.py index 52fa904..8f1b30f 100644 --- a/tasks/activity.py +++ b/tasks/activity.py @@ -9,8 +9,8 @@ import config as c plugin = lightbulb.Plugin("activity") -# Check every minute if inactive -@tasks.task(s=60) +# Check every minute if inactive (or config duration if under 60 secs) +@tasks.task(s=60 if c.config["duration"] >= 60 else c.config["duration"]) async def check_activity(): for author_id, timestamp in c.db.items(): # If time between now and timestamp >= duration