You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//数据库拿出来的 - 除了10,其他都调用到了
data.getReplies(function(err, data) {
if(err) console.log(err);
console.log('db set');
console.log(data[10]); //有内容,而且插入时没有报错
for(var index in data) {
wechat.set(index, data[index]);
}
});
console.log('trying to get rule'); //为空
wechat.get(10);
wechat.get('10');
//console
db set
{ pattern: '/[0-9]+/', handler: 'this is a number' }
trying to get rule
The text was updated successfully, but these errors were encountered:
我测试了好多遍还是不知道问题在哪里,真是麻烦大大帮忙看一下。
我从数据库里面调用一条数据,里面有个正则。用的是webot.set插入。大概遇到以下几个问题:
1- 插入时没有错误,但是无法用webot.get获取这条rule
2- 不知为何,只有在处理事件的时候才会调用这条rule。但是由于这是一个正则,所以整个rule都无效了
如果手工创建一条正则rule是正确的。
The text was updated successfully, but these errors were encountered: