Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404错误是神马情况呢? #8

Closed
cobola opened this issue Dec 25, 2014 · 0 comments
Closed

404错误是神马情况呢? #8

cobola opened this issue Dec 25, 2014 · 0 comments

Comments

@cobola
Copy link

cobola commented Dec 25, 2014

规则里面写了

//所有消息都无法匹配时的fallback
webot.set(/.*/, function(info){
// 利用 error log 收集听不懂的消息,以利于接下来完善规则
// 你也可以将这些 message 存入数据库
log('unhandled message: %s', info.text);
info.flag = true;
return '你发送了「' + info.text + '」,可惜我太笨了,听不懂. 发送: help 查看可用的指令';
});

还是不能识别自定义的规则 比如

/ 可以通过回调返回结果
webot.set('search', {
description: '发送: s 关键词 ',
pattern: /^(?:搜索?|search|百度|s\b)\s*(.+)/i,
//handler也可以是异步的
handler: do_search
});

是什么原因呢?

Don't know what you are saying

@cobola cobola closed this as completed Dec 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant