From 5458248403daa3ecb3edca2b9f712a85dec058ff Mon Sep 17 00:00:00 2001 From: nonebot Date: Sat, 7 Nov 2020 09:52:23 +0000 Subject: [PATCH] :memo: update api docs --- docs/api/typing.md | 52 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/docs/api/typing.md b/docs/api/typing.md index 72d66f23..cdf9f224 100644 --- a/docs/api/typing.md +++ b/docs/api/typing.md @@ -110,7 +110,7 @@ sidebarDepth: 0 -## `PreProcessor` +## `EventPreProcessor` * **类型** @@ -121,7 +121,55 @@ sidebarDepth: 0 * **说明** - 消息预处理函数 PreProcessor 类型 + 事件预处理函数 EventPreProcessor 类型 + + + + +## `EventPostProcessor` + + +* **类型** + + `Callable[[Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]` + + + +* **说明** + + 事件预处理函数 EventPostProcessor 类型 + + + + +## `RunPreProcessor` + + +* **类型** + + `Callable[[Matcher, Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]` + + + +* **说明** + + 事件响应器运行前预处理函数 RunPreProcessor 类型 + + + + +## `RunPostProcessor` + + +* **类型** + + `Callable[[Matcher, List[Any], Bot, Event, dict], Union[Awaitable[None], Awaitable[NoReturn]]]` + + + +* **说明** + + 事件响应器运行前预处理函数 RunPostProcessor 类型,第二个参数包含运行时产生的错误以及 `ExpiredException`, `StopPropagation` (如果存在)