🐛 fixed plugin update error.
🐛 修复 plugin update 命令错误。
This commit is contained in:
parent
193057894d
commit
48e4f61d3d
@ -21,11 +21,11 @@ def get_html(url):
|
|||||||
def remove_plugin(name):
|
def remove_plugin(name):
|
||||||
plugin_directory = f"{working_dir}/plugins/"
|
plugin_directory = f"{working_dir}/plugins/"
|
||||||
try:
|
try:
|
||||||
remove(f"{plugin_directory}{name}")
|
remove(f"{plugin_directory}{name}.py")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
remove(f"{plugin_directory}{name}.disabled")
|
remove(f"{plugin_directory}{name}.py.disabled")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ async def plugin(context):
|
|||||||
temp = False
|
temp = False
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
remove_plugin(f'{i}.py')
|
remove_plugin(i)
|
||||||
download(i)
|
download(i)
|
||||||
update_version(i, x['version'])
|
update_version(i, x['version'])
|
||||||
success_list.append(i)
|
success_list.append(i)
|
||||||
|
Loading…
Reference in New Issue
Block a user