I have referred to the beepbophq tutorials. In that they show ed how to integrate slackbot with wit.ai to make it more intellegent.The problem I am facing lies in the code of js file.The line wit.hears() is giving me an error that 'hears' method is not found.But in the tutorial its being used.I have already imported witbot and botkit libraries. Kindly provide me solutions Thanks un advance
Asked
Active
Viewed 116 times
1 Answers
0
I had the same problem. I have resolved it like follows:
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!')
});
});
But the problem is, it never executes the "bot.reply" part. I hope you can figure out that part.

Utku
- 1