Advertisement
kopyl

Untitled

Dec 10th, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.81 KB | None | 0 0
  1. def construct_user_info(update):
  2.     user_id = update.effective_user.id
  3.     username = update.effective_user.username
  4.     first_name = update.effective_user.first_name
  5.     last_name = update.effective_user.last_name
  6.     info = (
  7.         (
  8.             f"`{user_id}` \n"
  9.             f"@{username}\n" if username else ""
  10.         ) +
  11.         (f"{first_name} " if  first_name else "") +
  12.         f"{last_name} " if  last_name else ""
  13.     )
  14.     return info
  15.  
  16.  
  17. await context.bot.copy_message(
  18.         REPORTING_CHAT_ID,
  19.         update.effective_chat.id,
  20.         sent_photo.message_id,
  21.         parse_mode=constants.ParseMode.MARKDOWN,
  22.         caption=USER_RESPONSE_INFO_MESSAGE.format(
  23.             user_info=construct_user_info(update),
  24.             image_info=construct_image_response_info(update, seed)
  25.         )
  26.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement