aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/infini/const/templates.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/infini/const/templates.py b/src/infini/const/templates.py
index d780c248..9a450846 100644
--- a/src/infini/const/templates.py
+++ b/src/infini/const/templates.py
@@ -1,15 +1,15 @@
HANDLER = """from infini import Handler, MessageEvent
from infini.matcher import MatcherEvent
+from infini.event import InfiniEvent
from .event import MyEvent
class MyHandler(Handler):
\"\"\"自设业务函数\"\"\"
- name = "example_handler" # 业务函数事件名
priority: int = 0 # 业务函数权重
- def process(self, event: MatcherEvent) -> MessageEvent:
+ def process(self, event: MatcherEvent) -> InfiniEvent:
\"\"\"声明规则包检定方式\"\"\"
plain_text = event.get_plain_text()
return MyEvent("rule.example_event", plain_text=plain_text)