Nvm that sucks, probably try catch works as well.

This commit is contained in:
2026-06-28 16:03:17 +02:00
parent a13748b833
commit 7dab0ed143

View File

@@ -44,6 +44,7 @@ async def on_ready():
@tasks.loop(seconds=5)
async def task_loop():
try:
print(str(datetime.datetime.now()) + ": Loop running.")
await bot.change_presence(
activity=discord.Activity(
@@ -89,7 +90,11 @@ async def task_loop():
)
if value == "Eliminated":
await channel.send(
'Game **"' + game.name + '"**: ' + key + " has been eliminated."
'Game **"'
+ game.name
+ '"**: '
+ key
+ " has been eliminated."
)
if value == "Turn unfinished":
await channel.send(
@@ -101,3 +106,5 @@ async def task_loop():
)
game.update_players()
game.to_json()
except Exception as e:
print(e)