Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bottender-chatbase

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bottender-chatbase

Middleware for using Chatbase with Bottender.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
3
Weekly downloads
 
Created
Source

Bottender Chatbase

npm Build Status License: MIT

Middleware for using Chatbase with Bottender.

Installation

npm install bottender-chatbase

Example

const { MessengerBot } = require('bottender');
const { createServer } = require('bottender/express');
const chatbaseMiddleware = require('bottender-chatbase/express');

const bot = new MessengerBot({
  accessToken: '__FILL_YOUR_TOKEN_HERE__',
  appSecret: '__FILL_YOUR_SECRET_HERE__',
});

bot.onEvent(async context => {
  await context.sendText('Hello World');
});

const server = createServer(bot, {
  verifyToken: '__FILL_YOUR_VERIFY_TOKEN_HERE__',
  webhookMiddleware: chatbaseMiddleware(bot, {
    apiKey: '__FILL_YOUR_CHATBASE_KEY_HERE__',
    platform: 'Facebook',
  }),
});

server.listen(5000, () => {
  console.log('server is running on 5000 port...');
});

Server

Supported server:

  1. express
  2. koa

express

const chatbaseMiddleware = require('bottender-chatbase/express');

koa

const chatbaseMiddleware = require('bottender-chatbase/koa');

Contributing

Pull Requests and issue reports are welcome. You can follow steps below to submit your pull requests:

Fork, then clone the repo:

git clone git@github.com:your-username/bottender-chatbase.git

Install the dependencies:

cd bottender-chatbase
yarn

Make sure the tests pass (including eslint, flow checks and jest tests):

yarn test

Make your changes and tests, and make sure the tests pass.

License

MIT © Yoctol

Keywords

FAQs

Package last updated on 08 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc