mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-20 09:38:23 +08:00
Update builtin plugins
This commit is contained in:
parent
0256ae4216
commit
7713dc3be8
@ -4,10 +4,10 @@ from nonebot.message import unescape
|
|||||||
|
|
||||||
@on_command('echo')
|
@on_command('echo')
|
||||||
async def echo(session: CommandSession):
|
async def echo(session: CommandSession):
|
||||||
await session.send(session.get_optional('message') or session.current_arg)
|
await session.send(session.state.get('message') or session.current_arg)
|
||||||
|
|
||||||
|
|
||||||
@on_command('say', permission=perm.SUPERUSER)
|
@on_command('say', permission=perm.SUPERUSER)
|
||||||
async def say(session: CommandSession):
|
async def say(session: CommandSession):
|
||||||
await session.send(
|
await session.send(
|
||||||
unescape(session.get_optional('message') or session.current_arg))
|
unescape(session.state.get('message') or session.current_arg))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user