1
我正在嘗試api.ai中間件插件與botkit-sms,我試圖調試源代碼,爲什麼這不起作用,但如果您可以提供圖書館https://github.com/krismuniz/botkit-sms/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')
})