randydev commited on
Commit
c816df3
1 Parent(s): 84661f4

Update database.py

Browse files
Files changed (1) hide show
  1. database.py +5 -0
database.py CHANGED
@@ -30,6 +30,7 @@ class Database:
30
  self.gachabots = self.db["gachabots"]
31
  self.cohere = self.db["cohere"]
32
  self.chatbot = self.db["chatbot"]
 
33
  self.backup_chatbot = self.db["backupchatbot"]
34
  self.antiarabic = self.db["antiarabic"]
35
  self.antinsfw = self.db["antinsfw"]
@@ -639,6 +640,10 @@ class Database:
639
  user_data = await self.chatbot.find_one({"chat_id": chat_id})
640
  return user_data.get("user_id") if user_data else None
641
 
 
 
 
 
642
  async def remove_chatbot(self, chat_id):
643
  unset_data = {"user_id": None}
644
  return await self.chatbot.update_one({"chat_id": chat_id}, {"$unset": unset_data})
 
30
  self.gachabots = self.db["gachabots"]
31
  self.cohere = self.db["cohere"]
32
  self.chatbot = self.db["chatbot"]
33
+ self.gemini_plan = self.db["gemini_plan"]
34
  self.backup_chatbot = self.db["backupchatbot"]
35
  self.antiarabic = self.db["antiarabic"]
36
  self.antinsfw = self.db["antinsfw"]
 
640
  user_data = await self.chatbot.find_one({"chat_id": chat_id})
641
  return user_data.get("user_id") if user_data else None
642
 
643
+ async def gemini_plan(self, chat_id):
644
+ user_data = await self.gemini_plan.find_one({"user_id": user_id})
645
+ return user_data.get("is_plan") if user_data else None
646
+
647
  async def remove_chatbot(self, chat_id):
648
  unset_data = {"user_id": None}
649
  return await self.chatbot.update_one({"chat_id": chat_id}, {"$unset": unset_data})