mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-05 03:24:53 +08:00
15 lines
430 B
Python
15 lines
430 B
Python
from aiocqhttp.message import unescape
|
|
|
|
from none import on_command, CommandSession, permission as perm
|
|
|
|
|
|
@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 _(session: CommandSession):
|
|
await session.send(
|
|
unescape(session.get_optional('message') or session.current_arg))
|