Compare commits

...

3 Commits

Author SHA1 Message Date
448fc8aebe Added before actually chaning, oops. 2026-06-28 16:04:27 +02:00
7dab0ed143 Nvm that sucks, probably try catch works as well. 2026-06-28 16:03:17 +02:00
a13748b833 Added logging for troubleshooting. 2026-06-28 15:59:08 +02:00

12
main.py
View File

@@ -1,3 +1,5 @@
from datetime import time
import datetime
import discord
import os
from discord.ext import tasks
@@ -42,6 +44,8 @@ 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(
type=discord.ActivityType.watching,
@@ -86,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(
@@ -98,3 +106,5 @@ async def task_loop():
)
game.update_players()
game.to_json()
except Exception as e:
print(e)