Skip to content

Instantly share code, notes, and snippets.

Created June 24, 2020 04:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
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
// 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment