forked from Cryz/battle_royale_sim
less logs lines
This commit is contained in:
@@ -43,7 +43,7 @@ async def show_logs(update, context):
|
|||||||
try:
|
try:
|
||||||
game_log= _os.path.expanduser(f'{_botsyms.BOT_PATH}/battle_royale.log')
|
game_log= _os.path.expanduser(f'{_botsyms.BOT_PATH}/battle_royale.log')
|
||||||
with open(game_log, 'r') as _log_file:
|
with open(game_log, 'r') as _log_file:
|
||||||
lines= _log_file.readlines()[-30:] # last 30 lines
|
lines= _log_file.readlines()[-10:]
|
||||||
log_content= '\n'.join(lines)
|
log_content= '\n'.join(lines)
|
||||||
await update.message.reply_text(f"Contenuto del log:\n{log_content}")
|
await update.message.reply_text(f"Contenuto del log:\n{log_content}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user