clean bot and fix autostop with scheduled game

This commit is contained in:
andrea
2025-07-26 20:58:35 +02:00
parent 2bf65583b7
commit 460a6ccdec
3 changed files with 85 additions and 62 deletions

View File

@@ -1,7 +1,7 @@
from utils import logs as _log
import debug as _dbg
from utils import logs as _log
def get_winner(Arena):
def get_winner(context, Arena):
winner= Arena.get_alive_players()[0]
try:
context.job.schedule_removal()
@@ -34,5 +34,5 @@ async def simulate_day(context, chat_id):
msg= Arena.get_ranking()
await context.bot.send_message(chat_id, msg)
if len(Arena.get_alive_players()) == 1:
msg= get_winner(Arena)
msg= get_winner(context, Arena)
return await context.bot.send_message(chat_id, msg)