Clean up and fix

This commit is contained in:
Richard Chien
2017-02-16 09:10:56 +08:00
parent 0f7f9250c1
commit 82a0681e9f
4 changed files with 19 additions and 20 deletions

View File

@ -29,12 +29,13 @@ def process(args_text, ctx_msg):
ctx_msg['parsed_data'] = most_possible_cmd[3]
cmdhub.call(most_possible_cmd[1], most_possible_cmd[2], ctx_msg)
else:
if ctx_msg.get('from_voice'):
# Special for voice message
if _fallback_command:
core.echo('暂时无法理解你的意思,下面将使用备用命令 ' + _fallback_command + '……', ctx_msg)
cmdhub.call(_fallback_command, sentence, ctx_msg)
return
core.echo('暂时无法理解你的意思。\n'
'由于自然语言识别还非常不完善,建议使用命令来精确控制我。\n'
'如需帮助请发送「使用帮助」。', ctx_msg)
# if ctx_msg.get('from_voice'):
# Special for voice message
if _fallback_command:
core.echo('暂时无法理解你的意思,下面将使用备用命令 ' + _fallback_command + '……', ctx_msg)
cmdhub.call(_fallback_command, sentence, ctx_msg)
return
pass
# core.echo('暂时无法理解你的意思。\n'
# '由于自然语言识别还非常不完善,建议使用命令来精确控制我。\n'
# '如需帮助请发送「使用帮助」。', ctx_msg)