Thursday 20 April 2017

botkit-sms: Integrating middleware plugin

I'm trying to api.ai middleware plugin with botkit-sms, I'm tryting to debug the source code, why this isn't working, but will be helpful if you can provide some input

Source code of the library https://github.com/krismuniz/botkit-sms/

var apiai = require('botkit-middleware-apiai')({
  token: '...',
  skip_bot: true // or false. If true, the middleware don't send the bot reply/says to api.ai
})

controller.middleware.receive.use(apiai.receive)

controller.hears('.*', 'message_received', apiai.hears, function (bot, message) {
  console.log('received :: ' + message)
  bot.reply(message, 'got the message')
})



via Somasundaram Sekar

No comments:

Post a Comment