2020-12-07 00:06:09 +08:00
|
|
|
from nonebot.typing import State
|
|
|
|
from nonebot.matcher import Matcher
|
|
|
|
from nonebot.adapters import Bot, Event
|
2020-11-07 18:15:09 +08:00
|
|
|
from nonebot.message import event_preprocessor, run_preprocessor
|
|
|
|
|
|
|
|
|
|
|
|
@event_preprocessor
|
2020-12-07 00:06:09 +08:00
|
|
|
async def handle(bot: Bot, event: Event, state: 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
|
2020-12-07 00:06:09 +08:00
|
|
|
async def run(matcher: Matcher, bot: Bot, event: Event, state: State):
|
2020-11-07 18:15:09 +08:00
|
|
|
print(matcher)
|