dragxd commited on
Commit
106c529
·
verified ·
1 Parent(s): bcfcd4b

Update bot.py

Browse files
Files changed (1) hide show
  1. bot.py +5 -2
bot.py CHANGED
@@ -67,8 +67,11 @@ plugin_dicts: Dict[str, Dict[str, MangaClient]] = {
67
  }
68
 
69
  cache_dir = "cache"
70
- if os.path.exists(cache_dir):
71
- shutil.rmtree(cache_dir)
 
 
 
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