Skip to content

Commit

Permalink
Add doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
annndruha committed Jul 17, 2023
1 parent db19bb5 commit b39dc2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ async def wrapper(update: Update, context: ContextTypes.DEFAULT_TYPE):


def log_name(update):
"""
Get from update user id, username and message id.
Created for short code in logging
:param update:
:return: String with
"""
if update.message is None:
ucq = update.callback_query
return f"[{ucq.from_user.id} {ucq.from_user.full_name}] [{ucq.message.id}]"
Expand Down

0 comments on commit b39dc2e

Please sign in to comment.