mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 16:21:28 +00:00
✨ finish matcher process
This commit is contained in:
17
tests/test_plugins/test_depends.py
Normal file
17
tests/test_plugins/test_depends.py
Normal file
@ -0,0 +1,17 @@
|
||||
from nonebot import on_command
|
||||
from nonebot.log import logger
|
||||
from nonebot.processor import Depends
|
||||
|
||||
test = on_command("123")
|
||||
|
||||
|
||||
def depend(state: dict):
|
||||
return state
|
||||
|
||||
|
||||
@test.got("a", prompt="a")
|
||||
@test.got("b", prompt="b")
|
||||
@test.receive()
|
||||
@test.got("c", prompt="c")
|
||||
async def _(state: dict = Depends(depend)):
|
||||
logger.info(f"=======, {state}")
|
Reference in New Issue
Block a user