1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
from abc import ABCMeta, abstractmethod from .event import MatcherEvent, InfiniEvent __all__ = ["Handler"] class Handler: """规则包业务基类""" name: str priority: int = 0 def __init__(self) -> None: pass @abstractmethod def process(self, event: MatcherEvent) -> InfiniEvent: raise NotImplementedError