Update chatbot/plugins/chat.py
Browse files- chatbot/plugins/chat.py +6 -1
chatbot/plugins/chat.py
CHANGED
@@ -451,6 +451,11 @@ async def startbot(client: Client, message: Message):
|
|
451 |
),
|
452 |
]
|
453 |
]
|
|
|
|
|
|
|
|
|
|
|
454 |
await message.reply_text(
|
455 |
text=GEMINI_START_TEXT,
|
456 |
disable_web_page_preview=True,
|
@@ -489,7 +494,7 @@ async def chatbot_talk(client: Client, message: Message):
|
|
489 |
await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_PHOTO)
|
490 |
await asyncio.sleep(1.5)
|
491 |
|
492 |
-
if re.findall(r"\b(picture)\b", caption, re.IGNORECASE):
|
493 |
try:
|
494 |
backup_chat = await db._get_chatbot_chat_from_db(message.from_user.id)
|
495 |
backup_chat.append({"role": "user", "parts": [{"text": caption}]})
|
|
|
451 |
),
|
452 |
]
|
453 |
]
|
454 |
+
await db.backup_chatbot.update_one(
|
455 |
+
{"bot_id": client.me.id},
|
456 |
+
{"$addToSet": {"broadcast": message.from_user.id}},
|
457 |
+
upsert=True
|
458 |
+
)
|
459 |
await message.reply_text(
|
460 |
text=GEMINI_START_TEXT,
|
461 |
disable_web_page_preview=True,
|
|
|
494 |
await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_PHOTO)
|
495 |
await asyncio.sleep(1.5)
|
496 |
|
497 |
+
if re.findall(r"\b(This is a picture of me)\b", caption, re.IGNORECASE):
|
498 |
try:
|
499 |
backup_chat = await db._get_chatbot_chat_from_db(message.from_user.id)
|
500 |
backup_chat.append({"role": "user", "parts": [{"text": caption}]})
|