diff --git a/bot/helper/ext_utils/db_handler.py b/bot/helper/ext_utils/db_handler.py index 3b1b7b189..1935a2d09 100644 --- a/bot/helper/ext_utils/db_handler.py +++ b/bot/helper/ext_utils/db_handler.py @@ -171,19 +171,19 @@ async def add_incomplete_task(self, cid, link, tag): async def get_pm_uids(self): if self._return: return None - return [doc["_id"] async for doc in self._db.pm_users[TgClient.ID].find({})] + return [doc["_id"] async for doc in self.db.pm_users[TgClient.ID].find({})] async def update_pm_users(self, user_id): if self._return: return - if not bool(await self._db.pm_users[TgClient.ID].find_one({"_id": user_id})): - await self._db.pm_users[TgClient.ID].insert_one({"_id": user_id}) + if not bool(await self.db.pm_users[TgClient.ID].find_one({"_id": user_id})): + await self.db.pm_users[TgClient.ID].insert_one({"_id": user_id}) LOGGER.info(f"New PM User Added : {user_id}") async def rm_pm_user(self, user_id): if self._return: return - await self._db.pm_users[TgClient.ID].delete_one({"_id": user_id}) + await self.db.pm_users[TgClient.ID].delete_one({"_id": user_id}) async def update_user_tdata(self, user_id, token, time): if self._return: