mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-25 09:35:03 +08:00
14 lines
426 B
Python
14 lines
426 B
Python
from none import on_command, CommandSession, permission as perm
|
|
from none.message import unescape
|
|
|
|
|
|
@on_command('echo')
|
|
async def echo(session: CommandSession):
|
|
await session.send(session.get_optional('message') or session.current_arg)
|
|
|
|
|
|
@on_command('say', permission=perm.SUPERUSER)
|
|
async def say(session: CommandSession):
|
|
await session.send(
|
|
unescape(session.get_optional('message') or session.current_arg))
|