mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 03:46:54 +08:00
16 lines
376 B
Python
16 lines
376 B
Python
from nonebot.adapters import Event
|
|
from nonebot.typing import T_State
|
|
from nonebot.matcher import Matcher
|
|
from nonebot.message import run_preprocessor, event_preprocessor
|
|
|
|
|
|
@event_preprocessor
|
|
async def handle(event: Event, state: T_State):
|
|
state["preprocessed"] = True
|
|
print(type(event), event)
|
|
|
|
|
|
@run_preprocessor
|
|
async def run(matcher: Matcher):
|
|
print(matcher)
|