Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
|
@@ -122,6 +122,15 @@ def sibyl_get_all_banlist():
|
|
| 122 |
}
|
| 123 |
}
|
| 124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
@app.delete("/UFoP/bandel", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 126 |
def sibyl_system_delete(
|
| 127 |
item: SibylSystemDel,
|
|
@@ -154,7 +163,7 @@ def sibyl_system_ban(
|
|
| 154 |
|
| 155 |
try:
|
| 156 |
date_joined = str(dt.now())
|
| 157 |
-
sibyl_ban = random.choice(
|
| 158 |
_, _, is_banned, _, sibyl_user_id = db.get_sibyl_system_banned(item.user_id)
|
| 159 |
|
| 160 |
if sibyl_user_id and is_banned:
|
|
@@ -195,15 +204,6 @@ def sibyl_system(
|
|
| 195 |
else:
|
| 196 |
return {"status": "false", "message": "Not Found User"}
|
| 197 |
|
| 198 |
-
@app.get("/UFoP/blacklist-words")
|
| 199 |
-
def blacklist_words():
|
| 200 |
-
try:
|
| 201 |
-
BLACKLIST_WORDS = BadWordsList()
|
| 202 |
-
results_all = BLACKLIST_WORDS.banned_by_google(file_txt="banned_by_google.txt", storage=True)
|
| 203 |
-
return {"status": "true", "results": results_all}
|
| 204 |
-
except Exception as e:
|
| 205 |
-
return {"status": "false", "message": f"Internal server error: {str(e)}"}
|
| 206 |
-
|
| 207 |
@app.get("/ryuzaki/ai")
|
| 208 |
def ryuzaki_ai(
|
| 209 |
text: str = Query(..., description="text in query parameter"),
|
|
|
|
| 122 |
}
|
| 123 |
}
|
| 124 |
|
| 125 |
+
@app.get("/UFoP/blacklist-words")
|
| 126 |
+
def blacklist_words():
|
| 127 |
+
try:
|
| 128 |
+
BLACKLIST_WORDS = BadWordsList()
|
| 129 |
+
results_all = BLACKLIST_WORDS.banned_by_google(file_txt="banned_by_google.txt", storage=True)
|
| 130 |
+
return {"status": "true", "results": results_all}
|
| 131 |
+
except Exception as e:
|
| 132 |
+
return {"status": "false", "message": f"Internal server error: {str(e)}"}
|
| 133 |
+
|
| 134 |
@app.delete("/UFoP/bandel", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 135 |
def sibyl_system_delete(
|
| 136 |
item: SibylSystemDel,
|
|
|
|
| 163 |
|
| 164 |
try:
|
| 165 |
date_joined = str(dt.now())
|
| 166 |
+
sibyl_ban = random.choice(RAMDOM_STATUS)
|
| 167 |
_, _, is_banned, _, sibyl_user_id = db.get_sibyl_system_banned(item.user_id)
|
| 168 |
|
| 169 |
if sibyl_user_id and is_banned:
|
|
|
|
| 204 |
else:
|
| 205 |
return {"status": "false", "message": "Not Found User"}
|
| 206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
@app.get("/ryuzaki/ai")
|
| 208 |
def ryuzaki_ai(
|
| 209 |
text: str = Query(..., description="text in query parameter"),
|