nonebot2/tests/plugins/param/param_arg.py

15 lines
303 B
Python
Raw Normal View History

2021-12-20 06:31:48 +00:00
from nonebot.adapters import Event, Message
2021-12-23 14:16:55 +00:00
from nonebot.params import Arg, ArgStr, ArgPlainText
2021-12-20 06:31:48 +00:00
async def arg(key: Message = Arg()) -> Message:
return key
async def arg_str(key: str = ArgStr()) -> str:
return key
2021-12-23 14:16:55 +00:00
async def arg_plain_text(key: str = ArgPlainText()) -> str:
2021-12-20 06:31:48 +00:00
return key