fix missing message return, and immediate first message of the day
This commit is contained in:
2
bot.py
2
bot.py
@@ -48,7 +48,7 @@ async def start_game(update, context):
|
|||||||
await update.message.reply_text(f'Servono almeno 2 giocatori. Ecco i giocatori presenti nel mondo do gioco: \n{Arena.get_players()}')
|
await update.message.reply_text(f'Servono almeno 2 giocatori. Ecco i giocatori presenti nel mondo do gioco: \n{Arena.get_players()}')
|
||||||
return
|
return
|
||||||
|
|
||||||
context.job_queue.run_repeating(loop_game, interval=86400, first=0, chat_id= chat_id)
|
context.job_queue.run_repeating(loop_game, interval=86400, first=1, chat_id= chat_id)
|
||||||
#timezone = pytz.timezone('Europe/Rome')
|
#timezone = pytz.timezone('Europe/Rome')
|
||||||
#context.job_queue.run_daily(
|
#context.job_queue.run_daily(
|
||||||
#loop_game,
|
#loop_game,
|
||||||
|
|||||||
4
debug.py
4
debug.py
@@ -33,7 +33,9 @@ def _debug_data():
|
|||||||
|
|
||||||
def _end_game_debug(alive_players, day):
|
def _end_game_debug(alive_players, day):
|
||||||
last_player= alive_players[0]
|
last_player= alive_players[0]
|
||||||
print(f'{last_player.get_name()} sopravvive e vince dopo {day} lunghi Giorni, conquistando l\'amore eterno di Guarino')
|
msg= f'{last_player.get_name()} sopravvive e vince dopo {day} lunghi Giorni, conquistando l\'amore eterno di Guarino'
|
||||||
|
print(msg)
|
||||||
|
return msg
|
||||||
|
|
||||||
def play_one_day_debug(Arena):
|
def play_one_day_debug(Arena):
|
||||||
alive_players= Arena.get_alive_players()
|
alive_players= Arena.get_alive_players()
|
||||||
|
|||||||
Reference in New Issue
Block a user