diff --git a/plugins/napcat_adapter_plugin/event_handlers.py b/plugins/napcat_adapter_plugin/event_handlers.py index c78ff2b3e..83b81a955 100644 --- a/plugins/napcat_adapter_plugin/event_handlers.py +++ b/plugins/napcat_adapter_plugin/event_handlers.py @@ -2,7 +2,7 @@ from src.plugin_system import BaseEventHandler from src.plugin_system.base.base_event import HandlerResult from .src.send_handler import send_handler -from . import event_types +from .event_types import NapcatEvent from src.common.logger import get_logger logger = get_logger("napcat_adapter") @@ -13,7 +13,7 @@ class SetProfileHandler(BaseEventHandler): handler_description: str = "设置账号信息" weight: int = 100 intercept_message: bool = False - init_subscribe = [event_types.NapcatEvent.ACCOUNT.SET_PROFILE] + init_subscribe = [NapcatEvent.ACCOUNT.SET_PROFILE] async def execute(self,params:dict): raw = params.get("raw",{}) diff --git a/plugins/napcat_adapter_plugin/event_types.py b/plugins/napcat_adapter_plugin/event_types.py index c56012e48..0b2d1f375 100644 --- a/plugins/napcat_adapter_plugin/event_types.py +++ b/plugins/napcat_adapter_plugin/event_types.py @@ -1,6 +1,6 @@ from enum import Enum -class NapcatEvent(Enum): +class NapcatEvent: """ napcat插件事件枚举类 """