From 47729ceeb9bd4975a2b15f6dabcad0d6d22f01f8a0fe1b54b1c0f70c4efd7d9f Mon Sep 17 00:00:00 2001 From: andrea Date: Fri, 1 Aug 2025 19:20:23 +0200 Subject: [PATCH] bot log more user info --- bot.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 38ebbf1..b075eb3 100644 --- a/bot.py +++ b/bot.py @@ -38,8 +38,18 @@ async def bot_start(update, context): async def bot_commands(update, context): text= update.message.text chat_id = update.effective_chat.id + username= update.effective_chat.username + first_name= update.effective_chat.first_name + last_name= update.effective_chat.last_name + chat_type= update.effective_chat.type.name # PRIVAT|BOT|ETC.. - _log.log_info(f'bot_command: {chat_id} - text received: {text}') + + _log.log_info(f'bot_command: \ +user id="{chat_id}" \ +username="{username}" \ +first_name="{first_name}" \ +last_name="{last_name}" \ +chat_type="{chat_type}"') # init or restart the game if text == 'Init/Restart':