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