perf: 优化插件指令的卸载插件逻辑

This commit is contained in:
Soulter
2023-05-13 14:20:38 +08:00
parent d30881e59b
commit eec890cd02
+1 -1
View File
@@ -109,7 +109,7 @@ class Command:
if role != "admin":
return False, f"你的身份组{role}没有权限删除插件", "plugin"
try:
os.remove(os.path.join(ppath, l[2]))
os.removedirs(os.path.join(ppath, l[2]))
if l[2] in self.cached_plugins:
del self.cached_plugins[l[2]]
return True, "插件卸载成功~", "plugin"