diff --git a/astrbot/core/star/star_manager.py b/astrbot/core/star/star_manager.py index 53ee5045e3..c804189c77 100644 --- a/astrbot/core/star/star_manager.py +++ b/astrbot/core/star/star_manager.py @@ -996,7 +996,7 @@ async def reload(self, specified_plugin_name=None): logger.warning( f"插件 {smd.name} 未被正常终止: {e!s}, 可能会导致该插件运行不正常。", ) - if smd.name and smd.module_path: + if smd.name and smd.module_path and smd.activated: await self._unbind_plugin(smd.name, smd.module_path) star_handlers_registry.clear() @@ -1013,7 +1013,7 @@ async def reload(self, specified_plugin_name=None): logger.warning( f"插件 {smd.name} 未被正常终止: {e!s}, 可能会导致该插件运行不正常。", ) - if smd.name: + if smd.name and smd.activated: await self._unbind_plugin(smd.name, specified_module_path) result = await self.load(specified_module_path)