Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Bot does not reply #22

Closed
abidhkhan opened this issue Mar 24, 2017 · 6 comments
Closed

Bot does not reply #22

abidhkhan opened this issue Mar 24, 2017 · 6 comments

Comments

@abidhkhan
Copy link

Bot failed to reply on message_receive event. It looks like control never returns to bot controller and it hangs in wit.hears method, getting below log

debug: Successfully subscribed to Facebook events: {"success":true} {"msg_id":"262e9aa7-a945-452a-a275-3be9ff7c8970","_text":"hello","outcomes":[{"_text":"hello","confidence":null,"intent":"default_intent","entities":{"contact":[{"confidence":0.5748402256063738,"type":"value","value":"hello","suggested":true}]}}],"WARNING":"DEPRECATED"} debug: RECEIVED MESSAGE debug: CUSTOM FIND CONVO 1297127133704505 1297127133704505

Code snippet

`module.exports = function(bot, controller){
var wit = require('botkit-middleware-witai')({
token: process.env.wit_server_access_token,
logLevel: 'debug',
minConfidence: 0,
});

//Inject wit in receive
controller.middleware.receive.use(wit.receive);


// user said hello
controller.hears(['hello'], 'direct_message',wit.hears, function(bot, message) {
    bot.botkit.log("Wit.ai detected entities", message.entities);
    bot.reply(message, 'Hey there');

});

};
`

@rosy-sanby
Copy link

I am having exactly the same problem. Could you solve it?

@gcfabri
Copy link

gcfabri commented Apr 28, 2017

I think you need to change 'direct_message' to 'message_received' for FB bots. But I am facing the same problem here..I need some help too.

@dhewlettea
Copy link

I'm running into the same problem using with a Slack Bot.

@NayabSiddiqui
Copy link

I'm running into the same problem. Any update on this issue ?
Thanks in advance.

@dhewlettea
Copy link

For a Slack bot, I've found this fork to work for everything except direct_message (which also seems to be a bug with the howdyai version): https://github.com/dfischer/botkit-middleware-witai.git

@pilarfc
Copy link

pilarfc commented Oct 12, 2017

Your bot was sending you a message that this middleware is already deprecated, I think this is why it doesn't work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants