🎨 impove typing

This commit is contained in:
yanyongyu
2020-12-07 00:06:09 +08:00
parent 629eed08b6
commit 6b3f6a46e6
27 changed files with 60 additions and 137 deletions

View File

@ -1,13 +1,15 @@
from nonebot.typing import Bot, Event, Matcher
from nonebot.typing import State
from nonebot.matcher import Matcher
from nonebot.adapters import Bot, Event
from nonebot.message import event_preprocessor, run_preprocessor
@event_preprocessor
async def handle(bot: Bot, event: Event, state: dict):
async def handle(bot: Bot, event: Event, state: State):
state["preprocessed"] = True
print(event)
@run_preprocessor
async def run(matcher: Matcher, bot: Bot, event: Event, state: dict):
async def run(matcher: Matcher, bot: Bot, event: Event, state: State):
print(matcher)