forked from Cryz/battle_royale_sim
clean bot and fix autostop with scheduled game
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user