📝 update doc

This commit is contained in:
yanyongyu
2021-04-01 20:27:27 +08:00
parent f0a6ff4627
commit e03e3f6130
50 changed files with 123 additions and 5 deletions

View File

@ -19,7 +19,7 @@ from nonebot import get_driver
driver=get_driver()
```
共分为种函数:
共分为种函数:
### 启动准备
@ -73,6 +73,18 @@ async def handle_api_call(bot: Bot, api: str, data: Dict[str, Any]):
pass
```
### bot api 调用后钩子
这个钩子函数会在 `Bot` 调用 API 后运行。
```python
from nonebot.adapters import Bot
@Bot.on_called_api
async def handle_api_result(bot: Bot, exception: Optional[Exception], api: str, data: Dict[str, Any], result: Any):
pass
```
## 事件处理钩子
这些钩子函数指的是影响 `nonebot2` 进行 `事件处理` 的函数。