Fix args and return values

This commit is contained in:
Richard Chien
2018-06-25 10:41:48 +08:00
parent 8faee1151f
commit 844ade5c31
2 changed files with 11 additions and 16 deletions

View File

@ -7,16 +7,10 @@ from none.helpers import send
@none.on_command('echo')
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
async def echo(bot, session: Session):
await send(bot, session.ctx, session.current_arg)
@none.on_command('say', permission=perm.SUPERUSER)
async def _(bot, ctx, session: Session):
async def _(bot, session: Session):
await send(bot, session.ctx, unescape(session.current_arg))