mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 16:21:28 +00:00
📝 update doc
This commit is contained in:
@ -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` 进行 `事件处理` 的函数。
|
||||
|
Reference in New Issue
Block a user