【问题标题】:Issues in Integration of Slackbot with wit.aiSlackbot 与 wit.ai 集成的问题
【发布时间】:2016-08-21 14:45:24
【问题描述】:

我参考了 beepbophq 教程。他们展示了如何将 slackbot 与 wit.ai 集成以使其更智能。我面临的问题在于 js 文件的代码。wit.hears() 行给了我一个错误,即“听到”方法是没有找到。但是在教程中它被使用了。我已经导入了 witbot 和 botkit 库。 请给我解决方案 谢谢你提前

【问题讨论】:

    标签: node.js slack-api slack botkit


    【解决方案1】:

    我遇到了同样的问题。我已经解决了如下:

    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”部分。我希望你能弄清楚那部分。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-12-02
      • 2017-05-08
      • 2016-11-05
      • 1970-01-01
      • 1970-01-01
      • 2018-08-09
      • 2011-11-13
      相关资源
      最近更新 更多