关于weixin-robot加载的规则从数据库读取
发布于 9 年前 作者 carly1987 2868 次浏览 最后一次编辑是 8 年前 来自 问答

webot.set(‘hi’, ‘你好’);

webot.set(‘subscribe’, { pattern: function(info) { return info.is(‘event’) && info.param.event === ‘subscribe’; }, handler: function(info) { return ‘欢迎订阅微信机器人’; } }); webot.set(‘test’, { pattern: /^test/i, handler: function(info, next) { next(null, ‘roger that!’) } });

以上的set,如何读取数据库呢?请给express 的例子。谢谢大侠

回到顶部