randydev commited on
Commit
2dba60d
1 Parent(s): e3b84cb

Update database.py

Browse files
Files changed (1) hide show
  1. database.py +7 -0
database.py CHANGED
@@ -640,6 +640,13 @@ class Database:
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 is_gemini_plan(self, user_id):
644
  user_data = await self.gemini_plan.find_one({"user_id": user_id})
645
  return user_data.get("is_plan", False) if user_data else None
 
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 add_gemini_plan(self, user_id):
644
+ await self.gemini_plan.update_one(
645
+ {"user_id": user_id},
646
+ {"$set": {"is_plan": True}},
647
+ upsert=True
648
+ )
649
+
650
  async def is_gemini_plan(self, user_id):
651
  user_data = await self.gemini_plan.find_one({"user_id": user_id})
652
  return user_data.get("is_plan", False) if user_data else None