Closed AutomataVM closed 4 years ago
When Watson Assistant is used, there is no need to match intents in Botkit. Send all messages to Watson and reply with Watson responses.
I see, so using
controller.hears( ['.*'], 'message', async function(bot, message) { ... is the intended way right?
Actually I don't use controller.hears
at all,
I use controller.on('message', async function(bot, message) { });
In Botkit 0.7, correct event was message_received
,
probably I copied that approach from botkit-starter-web.
Gotcha. Thank you!
Hello! I wanted to know what's the problem with the controller.hears option, as it seems it isn't matching to the conversation I made. In Watson I have the intent "explanation" that matches each time the user wants one. On the other hand, In botkit, the controller.hears that corresponds to this handle is :
controller.hears( ['explain'], ['direct_message', 'direct_mention', 'mention','message'], watsonMiddleware.hear, async function(bot, message) { console.log('entre por explain'); await bot.reply(message, message.watsonData.output.text.join('\n'));
I have to mention I am using websockets. What could be the problem here?