Update chatbot/plugins/chat.py
Browse files- chatbot/plugins/chat.py +16 -0
chatbot/plugins/chat.py
CHANGED
@@ -1424,6 +1424,22 @@ async def chatbot_talk(client: Client, message: Message):
|
|
1424 |
LOGS.error(f"Error: Gemini Image: {str(e)}")
|
1425 |
return await message.reply_text("Server busy try again later")
|
1426 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1427 |
if re.findall(r"\b(enabled:chatstream)\b", query_base, re.IGNORECASE):
|
1428 |
await db.backup_chatbot.update_one(
|
1429 |
{"user_id": message.from_user.id},
|
|
|
1424 |
LOGS.error(f"Error: Gemini Image: {str(e)}")
|
1425 |
return await message.reply_text("Server busy try again later")
|
1426 |
|
1427 |
+
|
1428 |
+
if re.findall(r"\b(disabled:callusers)\b", query_base, re.IGNORECASE):
|
1429 |
+
if message.from_user.id != 6477856957:
|
1430 |
+
return
|
1431 |
+
try:
|
1432 |
+
data = await db.backup_chatbot.find({"is_system": True}).to_list(length=None)
|
1433 |
+
for user in data:
|
1434 |
+
await db.backup_chatbot.update_one(
|
1435 |
+
{"_id": user["_id"]},
|
1436 |
+
{"$set": {"is_system": False}},
|
1437 |
+
)
|
1438 |
+
await message.reply_text("All Users streaming is disabled now")
|
1439 |
+
return
|
1440 |
+
except Exception as e:
|
1441 |
+
await message.reply_text(f"Error {str(e)}")
|
1442 |
+
|
1443 |
if re.findall(r"\b(enabled:chatstream)\b", query_base, re.IGNORECASE):
|
1444 |
await db.backup_chatbot.update_one(
|
1445 |
{"user_id": message.from_user.id},
|