我已经参考了beepbophq教程。因为他们展示了如何将slackbot与wit.ai集成以使其更强大,我面临的问题在于js hears的代码行wit.hears()在教程中给了我一个错误,即‘intellegent.The’方法不是file.The,它被使用了。我已经导入了witbot和botkit库。请为我提供解决方案,感谢您的支持
发布于 2017-03-09 19:56:17
我也有同样的问题。我已经解决了如下问题:
this.controller.hears('', ['direct_message', 'direct_mention'], function (bot, message) {
var wit = witbot.process(message.text, bot, message);
wit.hears('hello', 0.5, function (bot, message, outcome) {
console.log('MESSAGE: ' + message);
console.log('OUTCOME: ' + outcome);
bot.reply(message, 'Hello to you as well!')
});
});但问题是,它从不执行"bot.reply“部分。我希望你能弄明白这一点。
https://stackoverflow.com/questions/39065443
复制相似问题