diff --git a/en/dev/star/plugin-new.md b/en/dev/star/plugin-new.md index f2b9eff..7918a6f 100644 --- a/en/dev/star/plugin-new.md +++ b/en/dev/star/plugin-new.md @@ -61,6 +61,8 @@ You can use AstrBot's hot reload feature to streamline the development process. After modifying the plugin code, you can find your plugin in the AstrBot WebUI's plugin management section, click the `...` button in the upper right corner, and select `Reload Plugin`. +If the plugin fails to load due to code errors or other reasons, you can also click **"Try one-click reload fix"** in the error prompt on the admin panel to reload it. + ### Plugin Dependency Management Currently, AstrBot manages plugin dependencies using pip's built-in `requirements.txt` file. If your plugin requires third-party libraries, please be sure to create a `requirements.txt` file in the plugin directory and list the dependencies used, to prevent Module Not Found errors when users install your plugin. diff --git a/en/use/webui.md b/en/use/webui.md index 81959d1..beaca03 100644 --- a/en/use/webui.md +++ b/en/use/webui.md @@ -41,6 +41,10 @@ You can also click the + button in the bottom right corner to manually install p > Due to the plugin update mechanism, the AstrBot Team cannot fully guarantee the security of plugins in the plugin market. Please carefully verify them. The AstrBot Team is not responsible for any losses caused by plugins. +### Handling Plugin Load Failures + +If a plugin fails to load, the admin panel will display the error message and provide a **"Try one-click reload fix"** button. This allows you to quickly reload the plugin after fixing the environment (e.g., installing missing dependencies) or modifying the code, without having to restart the entire application. + ## Command Management Use the `Command Management` menu on the left to centrally manage all registered commands; system plugins are hidden by default. diff --git a/zh/dev/star/plugin-new.md b/zh/dev/star/plugin-new.md index 3f3f94f..a893140 100644 --- a/zh/dev/star/plugin-new.md +++ b/zh/dev/star/plugin-new.md @@ -61,6 +61,8 @@ AstrBot 采用在运行时注入插件的机制。因此,在调试插件时, 插件的代码修改后,可以在 AstrBot WebUI 的插件管理处找到自己的插件,点击右上角 `...` 按钮,选择 `重载插件`。 +如果插件因为代码错误等原因加载失败,你也可以在管理面板的错误提示中点击 **“尝试一键重载修复”** 来重新加载。 + ### 插件依赖管理 目前 AstrBot 对插件的依赖管理使用 `pip` 自带的 `requirements.txt` 文件。如果你的插件需要依赖第三方库,请务必在插件目录下创建 `requirements.txt` 文件并写入所使用的依赖库,以防止用户在安装你的插件时出现依赖未找到(Module Not Found)的问题。 diff --git a/zh/use/webui.md b/zh/use/webui.md index c78a59e..268deda 100644 --- a/zh/use/webui.md +++ b/zh/use/webui.md @@ -41,6 +41,10 @@ AstrBot 管理面板具有管理插件、查看日志、可视化配置、查看 > 由于插件更新机制,AstrBot Team 无法完全保证插件市场中插件的安全性,请您仔细甄别。因为插件原因造成损失的,AstrBot Team 不予负责。 +### 插件加载失败处理 + +如果插件加载失败,管理面板会显示错误信息,并提供 **“尝试一键重载修复”** 按钮。这允许你在修复环境(如安装缺失依赖)或修改代码后,无需重启整个程序即可快速重新加载插件。 + ## 指令管理 通过左侧菜单 `指令管理`,可以集中管理所有已注册的指令,默认不显示系统插件。