1
0
Fork 0
mirror of https://github.com/myned/watcher.git synced 2024-11-01 12:22:38 +00:00

Fix sub-60 second role updates

This commit is contained in:
Myned 2023-03-16 03:09:03 -05:00
parent 50ba897d94
commit 214a45dc52
No known key found for this signature in database
GPG key ID: 28056631D2CF6B1B

View file

@ -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