Now fixed
Browse files- chatbot/plugins/chat.py +3 -5
chatbot/plugins/chat.py
CHANGED
@@ -473,7 +473,6 @@ async def startbot(client: Client, message: Message):
|
|
473 |
& ~filters.forwarded
|
474 |
)
|
475 |
async def chatbot_talk(client: Client, message: Message):
|
476 |
-
global translate_dict
|
477 |
user = await users_collection.find_one({"user_id": message.from_user.id})
|
478 |
model_ = user.get("model") if user else "gemini-2.0-flash"
|
479 |
|
@@ -487,7 +486,6 @@ async def chatbot_talk(client: Client, message: Message):
|
|
487 |
caption = message.caption or "What this?"
|
488 |
await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_PHOTO)
|
489 |
await asyncio.sleep(1.5)
|
490 |
-
LOGS.info(f"this caption: {caption}")
|
491 |
if re.findall(r"\b(pro:editimage)\b", caption, re.IGNORECASE):
|
492 |
await db.backup_chatbot.update_one(
|
493 |
{"user_id": message.from_user.id},
|
@@ -533,7 +531,7 @@ async def chatbot_talk(client: Client, message: Message):
|
|
533 |
for part in text_parts:
|
534 |
await message.reply_text(part)
|
535 |
else:
|
536 |
-
keyboard_like = create_keyboard()
|
537 |
await message.reply_text(
|
538 |
response.text,
|
539 |
disable_web_page_preview=True,
|
@@ -580,7 +578,7 @@ async def chatbot_talk(client: Client, message: Message):
|
|
580 |
for part in text_parts:
|
581 |
await message.reply_text(part)
|
582 |
else:
|
583 |
-
keyboard_like = create_keyboard()
|
584 |
await message.reply_text(
|
585 |
response.text,
|
586 |
disable_web_page_preview=True,
|
@@ -629,7 +627,7 @@ async def chatbot_talk(client: Client, message: Message):
|
|
629 |
for part in text_parts:
|
630 |
await message.reply_text(part)
|
631 |
else:
|
632 |
-
keyboard_like = create_keyboard()
|
633 |
await message.reply_text(
|
634 |
response.text,
|
635 |
disable_web_page_preview=True,
|
|
|
473 |
& ~filters.forwarded
|
474 |
)
|
475 |
async def chatbot_talk(client: Client, message: Message):
|
|
|
476 |
user = await users_collection.find_one({"user_id": message.from_user.id})
|
477 |
model_ = user.get("model") if user else "gemini-2.0-flash"
|
478 |
|
|
|
486 |
caption = message.caption or "What this?"
|
487 |
await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_PHOTO)
|
488 |
await asyncio.sleep(1.5)
|
|
|
489 |
if re.findall(r"\b(pro:editimage)\b", caption, re.IGNORECASE):
|
490 |
await db.backup_chatbot.update_one(
|
491 |
{"user_id": message.from_user.id},
|
|
|
531 |
for part in text_parts:
|
532 |
await message.reply_text(part)
|
533 |
else:
|
534 |
+
keyboard_like = create_keyboard(user_id=message.from_user.id)
|
535 |
await message.reply_text(
|
536 |
response.text,
|
537 |
disable_web_page_preview=True,
|
|
|
578 |
for part in text_parts:
|
579 |
await message.reply_text(part)
|
580 |
else:
|
581 |
+
keyboard_like = create_keyboard(user_id=message.from_user.id)
|
582 |
await message.reply_text(
|
583 |
response.text,
|
584 |
disable_web_page_preview=True,
|
|
|
627 |
for part in text_parts:
|
628 |
await message.reply_text(part)
|
629 |
else:
|
630 |
+
keyboard_like = create_keyboard(user_id=message.from_user.id)
|
631 |
await message.reply_text(
|
632 |
response.text,
|
633 |
disable_web_page_preview=True,
|