fix(timers): Remove user from last_seen on leave.

Fixes an issue where user inactivity was inaccurately tracked on rejoin.
This commit is contained in:
2024-09-26 01:46:39 +10:00
parent f2c449d2e0
commit 9c9107bf9d

View File

@@ -320,8 +320,6 @@ class TimerCog(LionCog):
return
if member.bot:
return
if 1148167212901859328 not in [role.id for role in member.roles]:
return
# If a member is leaving or joining a running timer, trigger a status update
if before.channel != after.channel:
@@ -331,6 +329,7 @@ class TimerCog(LionCog):
tasks = []
if leaving is not None:
tasks.append(asyncio.create_task(leaving.update_status_card()))
leaving.last_seen.pop(member.id, None)
if joining is not None:
joining.last_seen[member.id] = utc_now()
if not joining.running and joining.auto_restart: