Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
46c4a2e
1
Parent(s):
3772da1
Update approve_db.py
Browse files
Powers/database/approve_db.py
CHANGED
|
@@ -13,7 +13,16 @@ class Approve(MongoDB):
|
|
| 13 |
|
| 14 |
def check_approve(self, user_id: int):
|
| 15 |
with INSERTION_LOCK:
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
def add_approve(self, user_id: int, user_name: str):
|
| 19 |
with INSERTION_LOCK:
|
|
|
|
| 13 |
|
| 14 |
def check_approve(self, user_id: int):
|
| 15 |
with INSERTION_LOCK:
|
| 16 |
+
if not self.chat_info["users"]:
|
| 17 |
+
return False
|
| 18 |
+
for i in self.chat_info["users"]:
|
| 19 |
+
if user_id in i:
|
| 20 |
+
j = True
|
| 21 |
+
break
|
| 22 |
+
else:
|
| 23 |
+
j = False
|
| 24 |
+
return j
|
| 25 |
+
|
| 26 |
|
| 27 |
def add_approve(self, user_id: int, user_name: str):
|
| 28 |
with INSERTION_LOCK:
|