🤖 Middleware for using botimize with Botkit-powered bots
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
.babelrc
.eslintrc.json
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
package.json
yarn.lock

README.md

botimize-botkit-middleware

build status npm

This middleware plugin for Botkit allows you to seamlessly integrate Botimize functionalities into your Botkit bot.

Setup

  • Create a free account at Botimize to get an API key.

  • Install this middleware plugin with npm:

    npm install --save botimize-botkit-middleware

Usage

  • Use API key to create a new botimize and middleware objects:

    const botimize = require('botimize')('<YOUR-API-KEY>', 'facebook');
    const botimizeBotkit = require('botimize-botkit-middleware')(botimize);
  • Setup Botkit middleware:

    const controller = botkit.facebookbot({...});
    controller.middleware.receive.use(botimizeBotkit.receive);
    controller.middleware.send.use(botimizeBotkit.send);