Fix back space
Browse files- chatbot/plugins/chat.py +9 -9
chatbot/plugins/chat.py
CHANGED
@@ -585,15 +585,15 @@ async def chatbot_talk(client: Client, message: Message):
|
|
585 |
disable_web_page_preview=True,
|
586 |
reply_markup=keyboard_like
|
587 |
)
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
|
598 |
if re.findall(r"\b(I want to delete my data history)\b", query_base, re.IGNORECASE):
|
599 |
buttons = [
|
|
|
585 |
disable_web_page_preview=True,
|
586 |
reply_markup=keyboard_like
|
587 |
)
|
588 |
+
await db.backup_chatbot.update_one(
|
589 |
+
{"user_id": message.from_user.id},
|
590 |
+
{"$set": {"translate_text": response.text}},
|
591 |
+
upsert=True
|
592 |
+
)
|
593 |
+
backup_chat.append({"role": "model", "parts": [{"text": response.text}]})
|
594 |
+
await db._update_chatbot_chat_in_db(message.from_user.id, backup_chat)
|
595 |
+
await client.send_chat_action(message.chat.id, enums.ChatAction.CANCEL)
|
596 |
+
return
|
597 |
|
598 |
if re.findall(r"\b(I want to delete my data history)\b", query_base, re.IGNORECASE):
|
599 |
buttons = [
|