Skip to content

Instantly share code, notes, and snippets.

@ArjunHariharan
Last active April 24, 2018 15:31
Show Gist options
  • Save ArjunHariharan/de9633a62be47c1efdcc96c570c3abac to your computer and use it in GitHub Desktop.
Save ArjunHariharan/de9633a62be47c1efdcc96c570c3abac to your computer and use it in GitHub Desktop.
let Botkit = require('botkit');
let rasa = require('./Middleware/rasa')({rasa_uri: 'http://localhost:5000'});
let controller = Botkit.slackbot({
clientId: process.env.clientId,
clientSecret: process.env.clientSecret,
scopes: ['bot'],
json_file_store: __dirname + '/.db/'
});
// Override receive method in botkit
controller.middleware.receive.use(rasa.receive);
// Override hears method in botkit
controller.changeEars(function (patterns, message) {
return rasa.hears(patterns, message);
});
controller.setupWebserver(3000, function (err, webserver) {
// Configure a route to receive webhooks from slack
controller.createWebhookEndpoints(webserver);
});
@Govind-jha
Copy link

@Rahul6818 If you have not already got an answer, I would like to help you on this one. If you are aiming for deploying bot on Skype4B you could use ucwa api for it. Otherwise botkit have a connector for Skype, but it don't work for Skype4B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment