fix (timers): Voice event task creation.

This commit is contained in:
2023-06-08 21:03:48 +03:00
parent 83acfe21e7
commit eafadad610
2 changed files with 6 additions and 5 deletions

View File

@@ -184,14 +184,14 @@ class TimerCog(LionCog):
joining = self.get_channel_timer(after.channel.id) if after.channel else None
tasks = []
if leaving:
tasks.append(leaving.update_status_card())
if leaving is not None:
tasks.append(asyncio.create_task(leaving.update_status_card()))
if joining is not None:
joining.last_seen[member.id] = utc_now()
if not joining.running and joining.auto_restart:
tasks.append(joining.start())
tasks.append(asyncio.create_task(joining.start()))
else:
tasks.append(joining.update_status_card())
tasks.append(asyncio.create_task(joining.update_status_card()))
if tasks:
try: