模块管理优化

This commit is contained in:
liuwei
2025-03-20 10:14:07 +08:00
parent 4687382d3f
commit 56aeeae585

View File

@@ -363,6 +363,9 @@ class PluginManagerPlugin(MessagePluginInterface):
(roomid if roomid else sender), sender)
return True, f"插件 {actual_plugin_name} 不存在或已卸载"
# 获取插件的模块名,这才是插件管理器需要的名称
module_name = plugin.__class__.__module__.split('.')[-2]
# 使用插件管理器卸载插件 - 使用模块名而不是显示名称
self.LOG.info(f"正在卸载插件 {actual_plugin_name}(模块名:{module_name})")
success = self.plugin_manager.unload_plugin(module_name)