Improve command module and add "schedule" command group

This commit is contained in:
Richard Chien
2018-07-05 23:11:00 +08:00
parent f58bfa325e
commit 946d0a11cd
4 changed files with 231 additions and 42 deletions

View File

@ -117,6 +117,7 @@ async def handle_natural_language(bot: NoneBot, ctx: Dict[str, Any]) -> bool:
logger.debug(results)
if results and results[0].confidence >= 60.0:
# choose the result with highest confidence
return await call_command(bot, ctx,
results[0].cmd_name, results[0].cmd_args)
return await call_command(bot, ctx, results[0].cmd_name,
args=results[0].cmd_args,
check_perm=False)
return False