2018-06-15 15:00:58 +08:00
|
|
|
from aiocqhttp.message import unescape
|
|
|
|
|
2018-06-15 06:58:24 +08:00
|
|
|
import none
|
2018-06-15 15:00:58 +08:00
|
|
|
from none import permissions as perm
|
2018-06-24 23:00:37 +08:00
|
|
|
from none.command import Session
|
2018-06-15 15:00:58 +08:00
|
|
|
from none.helpers import send
|
|
|
|
|
|
|
|
|
|
|
|
@none.on_command('echo')
|
2018-06-24 23:00:37 +08:00
|
|
|
async def echo(bot, ctx, session: Session):
|
|
|
|
text = session.require_arg('text')
|
|
|
|
await send(bot, session.ctx, text)
|
|
|
|
|
|
|
|
|
|
|
|
@echo.argparser
|
|
|
|
def _(session: Session):
|
|
|
|
session.args['text'] = session.current_arg
|
2018-06-15 06:58:24 +08:00
|
|
|
|
|
|
|
|
2018-06-15 15:00:58 +08:00
|
|
|
@none.on_command('say', permission=perm.SUPERUSER)
|
2018-06-24 23:00:37 +08:00
|
|
|
async def _(bot, ctx, session: Session):
|
|
|
|
await send(bot, session.ctx, unescape(session.current_arg))
|