forked from Cryz/battle_royale_sim
explicit logs
This commit is contained in:
9
bot.py
9
bot.py
@@ -25,7 +25,7 @@ async def bot_start(update, context):
|
||||
reply_markup= ReplyKeyboardMarkup(keyboard, one_time_keyboard=False, resize_keyboard=True)
|
||||
|
||||
chat_id = update.effective_chat.id
|
||||
_log.log_debug(f'{chat_id}: I\'m building the world\'s game...')
|
||||
_log.log_debug(f'bot_start: {chat_id} - I\'m building the world\'s game...')
|
||||
Arena= _arena.BrSimArena()
|
||||
|
||||
await update.message.reply_text('Ho creato il mondo di gioco', reply_markup=reply_markup)
|
||||
@@ -35,10 +35,9 @@ async def bot_commands(update, context):
|
||||
text= update.message.text
|
||||
chat_id = update.effective_chat.id
|
||||
|
||||
_log.log_info(f'bot_command: {chat_id} input: {text}')
|
||||
_log.log_info(f'bot_command: {chat_id} - text received: {text}')
|
||||
|
||||
if text == 'Init/Restart':
|
||||
_log.log_info(f'bot_command: {chat_id} Init/Restart')
|
||||
return await bot_start(update, context)
|
||||
|
||||
if text == 'Add Player':
|
||||
@@ -66,7 +65,7 @@ async def bot_commands(update, context):
|
||||
|
||||
if text == 'upstart': return await _bot_upstart.update_bot(update, context)
|
||||
|
||||
_log.log_debug(f'bot_command: {chat_id} sent this text: {text}')
|
||||
_log.log_debug(f'bot_command: {chat_id} - sent this text: {text}')
|
||||
await update.message.reply_text(_botsyms.WIP_MSG)
|
||||
|
||||
def main():
|
||||
@@ -75,7 +74,7 @@ def main():
|
||||
application.add_handler(CommandHandler('start', bot_start))
|
||||
application.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, bot_commands))
|
||||
|
||||
_log.log_debug('Bot is running...')
|
||||
_log.log_info('main: Bot is running...')
|
||||
application.run_polling()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user