MCPcopy Create free account
hub / github.com/TechifyBots/Rename-Bot / TechifyBots

Class TechifyBots

plugins/maintenance.py:19–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17BYPASS_IDS=normalize_ids(Config.ADMIN,Config.LOG_CHANNEL,Config.AUTH_CHANNELS,Config.AUTH_REQ_CHANNELS)
18
19class TechifyBots:
20 def __init__(self):
21 mongo_client=AsyncIOMotorClient(Config.DB_URL)
22 db=mongo_client[Config.DB_NAME]
23 self.settings_col=db["settings"]
24
25 async def get_maintenance(self)->bool:
26 data=await self.settings_col.find_one({"_id":"maintenance"})
27 return data.get("status",False) if data else False
28
29 async def set_maintenance(self,status:bool):
30 await self.settings_col.update_one(
31 {"_id":"maintenance"},
32 {"$set":{"status":status}},
33 upsert=True
34 )
35
36tb=TechifyBots()
37

Callers 1

maintenance.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected