Spaces:
Paused
Paused
Update bot.py
Browse files
bot.py
CHANGED
|
@@ -67,8 +67,11 @@ plugin_dicts: Dict[str, Dict[str, MangaClient]] = {
|
|
| 67 |
}
|
| 68 |
|
| 69 |
cache_dir = "cache"
|
| 70 |
-
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
| 72 |
with open("tools/help_message.txt", "r") as f:
|
| 73 |
help_msg = f.read()
|
| 74 |
|
|
|
|
| 67 |
}
|
| 68 |
|
| 69 |
cache_dir = "cache"
|
| 70 |
+
try:
|
| 71 |
+
if os.path.exists(cache_dir):
|
| 72 |
+
shutil.rmtree(cache_dir)
|
| 73 |
+
except PermissionError:
|
| 74 |
+
print(f"Warning: Could not remove {cache_dir} due to permissions.")
|
| 75 |
with open("tools/help_message.txt", "r") as f:
|
| 76 |
help_msg = f.read()
|
| 77 |
|