Update chatbot/plugins/chat.py
Browse files- 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(
|
|
|
|
|
|
|
|
|
|
|
|
|
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"
|
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 |
]
|