mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 00:55:07 +08:00
📝 Docs: 格式化钩子函数中的代码片段 (#2172)
This commit is contained in:
parent
4c5c97dca6
commit
5a526ddb40
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user