📝 Docs: 格式化钩子函数中的代码片段 (#2172)

This commit is contained in:
Akirami 2023-07-08 15:26:30 +08:00 committed by GitHub
parent 4c5c97dca6
commit 5a526ddb40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,7 @@ async def do_something(event: Event):
```python
from nonebot.message import event_postprocessor
@event_postprocessor
async def do_something(event: Event):
pass
@ -93,6 +94,7 @@ async def do_something(event: Event):
```python
from nonebot.message import run_preprocessor
@run_preprocessor
async def do_something(event: Event, matcher: Matcher):
pass

View File

@ -82,6 +82,7 @@ async def do_something(event: Event):
```python
from nonebot.message import event_postprocessor
@event_postprocessor
async def do_something(event: Event):
pass
@ -93,6 +94,7 @@ async def do_something(event: Event):
```python
from nonebot.message import run_preprocessor
@run_preprocessor
async def do_something(event: Event, matcher: Matcher):
pass

View File

@ -82,6 +82,7 @@ async def do_something(event: Event):
```python
from nonebot.message import event_postprocessor
@event_postprocessor
async def do_something(event: Event):
pass
@ -93,6 +94,7 @@ async def do_something(event: Event):
```python
from nonebot.message import run_preprocessor
@run_preprocessor
async def do_something(event: Event, matcher: Matcher):
pass