randydev commited on
Commit
8da11d7
Β·
verified Β·
1 Parent(s): 6266c41

Update chatbot/plugins/chat.py

Browse files
Files changed (1) hide show
  1. chatbot/plugins/chat.py +19 -2
chatbot/plugins/chat.py CHANGED
@@ -441,6 +441,7 @@ async def flux_prompt(client, callback):
441
  ]
442
  )
443
  keyboard = create_keyboard(user_id=user_id)
 
444
  await callback.message.edit_media(
445
  media=InputMediaPhoto(
446
  media=file_path,
@@ -448,7 +449,13 @@ async def flux_prompt(client, callback):
448
  ),
449
  reply_markup=keyboard
450
  )
451
- photo = await client.send_photo("LicenseAknBotDB", file_path)
 
 
 
 
 
 
452
  await db.backup_chatbot.update_one(
453
  {"user_id": user_id},
454
  {"$set": {
@@ -620,6 +627,16 @@ async def multiple_langagues(client, callback):
620
  LOGS.error(f"Exception multiple_langagues: {str(e)}")
621
  await callback.answer("Server busy try again later", True)
622
 
 
 
 
 
 
 
 
 
 
 
623
  def create_keyboard(likes: int = 0, unlikes: int = 0, user_id: int = None):
624
  keyboard = InlineKeyboardMarkup(
625
  [
@@ -627,7 +644,7 @@ def create_keyboard(likes: int = 0, unlikes: int = 0, user_id: int = None):
627
  InlineKeyboardButton(f"πŸ‘ {likes}", callback_data="like"),
628
  InlineKeyboardButton(f"πŸ‘Ž {unlikes}", callback_data="unlike"),
629
  InlineKeyboardButton(f"♾️", callback_data=f"trmulti_{user_id}"),
630
- InlineKeyboardButton(f"πŸ—ƒοΈ", callback_data=f"autopost_{user_id}"),
631
  InlineKeyboardButton(f"πŸ’Ύ", callback_data=f"memory_{user_id}"),
632
  ]
633
  ]
 
441
  ]
442
  )
443
  keyboard = create_keyboard(user_id=user_id)
444
+ view_button_user = anonymous_user(user_id=user_id)
445
  await callback.message.edit_media(
446
  media=InputMediaPhoto(
447
  media=file_path,
 
449
  ),
450
  reply_markup=keyboard
451
  )
452
+ photo = await client.send_photo(
453
+ "LicenseAknBotDB",
454
+ file_path,
455
+ caption=f"User Mention: `{callback.from_user.mention}`\n"
456
+ f"User ID: `{user_id}`",
457
+ reply_markup=view_button_user
458
+ )
459
  await db.backup_chatbot.update_one(
460
  {"user_id": user_id},
461
  {"$set": {
 
627
  LOGS.error(f"Exception multiple_langagues: {str(e)}")
628
  await callback.answer("Server busy try again later", True)
629
 
630
+ def anonymous_user(user_id: int = None):
631
+ keyboard = InlineKeyboardMarkup(
632
+ [
633
+ [
634
+ InlineKeyboardButton(f"πŸ‘€ View", url=f"tg://user?id={user_id}"),
635
+ ]
636
+ ]
637
+ )
638
+ return keyboard
639
+
640
  def create_keyboard(likes: int = 0, unlikes: int = 0, user_id: int = None):
641
  keyboard = InlineKeyboardMarkup(
642
  [
 
644
  InlineKeyboardButton(f"πŸ‘ {likes}", callback_data="like"),
645
  InlineKeyboardButton(f"πŸ‘Ž {unlikes}", callback_data="unlike"),
646
  InlineKeyboardButton(f"♾️", callback_data=f"trmulti_{user_id}"),
647
+ InlineKeyboardButton(f"πŸ—ƒοΈ", callback_data=f"menutools_{user_id}"),
648
  InlineKeyboardButton(f"πŸ’Ύ", callback_data=f"memory_{user_id}"),
649
  ]
650
  ]