2021-11-16 18:30:16 +08:00
|
|
|
from nonebot.adapters import Event
|
2020-12-17 21:09:30 +08:00
|
|
|
from nonebot.typing import T_State
|
2021-11-16 18:30:16 +08:00
|
|
|
from nonebot.matcher import Matcher
|
2021-11-13 19:38:01 +08:00
|
|
|
from nonebot.message import run_preprocessor, event_preprocessor
|
2020-11-07 18:15:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
@event_preprocessor
|
2021-11-16 18:30:16 +08:00
|
|
|
async def handle(event: Event, state: T_State):
|
2020-11-07 18:15:09 +08:00
|
|
|
state["preprocessed"] = True
|
2020-12-16 23:13:00 +08:00
|
|
|
print(type(event), event)
|
2020-11-07 18:15:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
@run_preprocessor
|
2021-11-16 18:30:16 +08:00
|
|
|
async def run(matcher: Matcher):
|
2020-11-07 18:15:09 +08:00
|
|
|
print(matcher)
|