尝试调整一下内容
This commit is contained in:
@@ -108,9 +108,11 @@ class PluginManager:
|
||||
for name, obj in inspect.getmembers(module):
|
||||
if (inspect.isclass(obj) and
|
||||
issubclass(obj, PluginInterface) and
|
||||
obj != PluginInterface and
|
||||
obj != MessagePluginInterface and
|
||||
obj != ScheduledPluginInterface):
|
||||
obj != PluginInterface
|
||||
# 修改这里:不排除继承自 MessagePluginInterface 和 ScheduledPluginInterface 的类
|
||||
# obj != MessagePluginInterface and
|
||||
# obj != ScheduledPluginInterface
|
||||
):
|
||||
plugin_class = obj
|
||||
break
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# 插件初始化文件
|
||||
# 从main模块导入插件类
|
||||
from .main import MessageSummaryPlugin
|
||||
from plugins.message_summary.main import MessageSummaryPlugin
|
||||
|
||||
def get_plugin():
|
||||
"""获取插件实例"""
|
||||
return MessageSummaryPlugin()
|
||||
|
||||
__all__ = ['MessageSummaryPlugin', 'get_plugin']
|
||||
Reference in New Issue
Block a user