nonebot2/none/plugins/base.py
Richard Chien 6ec3ac66f7 Add NLP
2018-07-01 17:51:01 +08:00

15 lines
466 B
Python

from aiocqhttp.message import unescape
from none import on_command, CommandSession, permission as perm
@on_command('echo', only_to_me=False)
async def echo(session: CommandSession):
await session.send(session.get_optional('message') or session.current_arg)
@on_command('say', permission=perm.SUPERUSER, only_to_me=False)
async def _(session: CommandSession):
await session.send(
unescape(session.get_optional('message') or session.current_arg))