Skip to content

Commit 85dcdb6

Browse files
antyufeevantyufeev
authored andcommitted
add user info in bot logs
1 parent 8284d91 commit 85dcdb6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ async def find(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
2323
tencode_column = headers.get('Ten-code')
2424
name_column = headers.get('Name')
2525
parsed_message = update.message.text.replace("/f", "").strip()
26+
user = update.effective_user
2627
response_message = ''
28+
29+
logging.info(f"User {user.first_name} (@{user.username or 'no_username'}) ID:{user.id} uses /f")
2730

2831
if any(char.isdigit() for char in parsed_message):
2932
if tencode_column:

0 commit comments

Comments
 (0)