update v0.1.5.8

This commit is contained in:
HibiKier 2022-05-29 20:47:18 +08:00
parent fb9db2f50c
commit 558f362919
5 changed files with 8 additions and 5 deletions

View File

@ -243,10 +243,11 @@ __Docker 最新版本由 [Sakuracio](https://github.com/Sakuracio) 提供__
## 更新
### 2022/5/29 \[v0.1.5.7]
### 2022/5/29 \[v0.1.5.8]
* 修复错误的resource路径会删除IMAGE_PATH等重要文件夹
* 提供了真寻适配仓库的插件 安装/卸载 操作
* 暂时关闭了插件资源清空
* 通过指令安装插件时会在插件目录下生成plugin_info.json记录当前插件信息
### 2022/5/28

View File

@ -1 +1 @@
__version__: v0.1.5.6
__version__: v0.1.5.8

View File

@ -40,7 +40,7 @@ def init_none_plugin_count_manager():
plugins2block_manager.save()
plugins_manager.delete(module)
plugins_manager.save()
resources_manager.remove_resource(module)
# resources_manager.remove_resource(module)
none_plugin_count_manager.delete(module)
logger.info(f"{module}:{plugin_name} 插件疑似已删除,清除对应插件数据...")
except Exception as e:

View File

@ -71,6 +71,8 @@ async def install_plugin(name: str) -> str:
os.system(
f"poetry run pip install -r {(extensive_plugin_path / f'{name}' / 'pyproject.toml').absolute()}"
)
with open(extensive_plugin_path / f'{name}' / "plugin_info.json", 'w') as f:
json.dump(data[name], f, ensure_ascii=False, indent=4)
logger.debug("移动插件文件夹完成...")
logger.info(f"成功安装插件 {name} 成功!\n{tmp}")
return f"成功安装插件 {name}请重启bot"

View File

@ -36,7 +36,7 @@ __plugin_settings__ = {
"limit_superuser": False,
"cmd": ["发送图片"] + Config.get_config("image_management", "IMAGE_DIR_LIST"),
}
__plugin_resources__ = {"pa": IMAGE_PATH}
__plugin_resources__ = {"pa": IMAGE_PATH / "pa"}
Config.add_plugin_config(
"_task",