mirror of
https://github.com/myned/watcher.git
synced 2024-12-25 05:27:27 +00:00
Fix sub-60 second role updates
This commit is contained in:
parent
50ba897d94
commit
214a45dc52
1 changed files with 2 additions and 2 deletions
|
@ -9,8 +9,8 @@ import config as c
|
||||||
plugin = lightbulb.Plugin("activity")
|
plugin = lightbulb.Plugin("activity")
|
||||||
|
|
||||||
|
|
||||||
# Check every minute if inactive
|
# Check every minute if inactive (or config duration if under 60 secs)
|
||||||
@tasks.task(s=60)
|
@tasks.task(s=60 if c.config["duration"] >= 60 else c.config["duration"])
|
||||||
async def check_activity():
|
async def check_activity():
|
||||||
for author_id, timestamp in c.db.items():
|
for author_id, timestamp in c.db.items():
|
||||||
# If time between now and timestamp >= duration
|
# If time between now and timestamp >= duration
|
||||||
|
|
Loading…
Reference in a new issue