1
0
Fork 0
mirror of https://github.com/myned/watcher.git synced 2024-12-24 21:17:28 +00:00

Add comment

This commit is contained in:
Myned 2022-08-16 17:36:37 -05:00
parent 9dfdf0287a
commit 50a6a5eab5
No known key found for this signature in database
GPG key ID: 28056631D2CF6B1B

View file

@ -13,6 +13,7 @@ plugin = lightbulb.Plugin("activity")
@tasks.task(s=60) @tasks.task(s=60)
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 dt.datetime.now(dt.timezone.utc) - timestamp >= dt.timedelta(seconds=c.config["duration"]): if dt.datetime.now(dt.timezone.utc) - timestamp >= dt.timedelta(seconds=c.config["duration"]):
try: try:
# Acquire member object # Acquire member object