New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

botnaut

Package Overview
Dependencies
Maintainers
3
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botnaut

Facebook Messenger Chatbot Framework

0.30.0-alpha.2
Source
npm
Version published
Weekly downloads
45
1400%
Maintainers
3
Weekly downloads
 
Created
Source

Botnaut - Facebook Messenger platform framework

Botnaut

CircleCI

Framework for building reusable chatbot components. Routing, Keyword recognition is built-in.

  • [API documentation]

Requirements and installation

  • requires mongoose > 4.0
  • requires nodejs > 6.0
  • requires express > 4.0
  • requires body-parser > 1.10
$ npm i -S botnaut

Basic setup with Express

It's easy. This basic example can handle everything.

const express = require('express');
const { Router } = require('botnaut');
const mongoose = require('mongoose');
const { createRouter, createProcessor } = require('botnaut/express');

const bot = new Router();

bot.use('/hello', (req, res, postBack) => {
    res.text('Hello world');
});

bot.use((req, res, postBack) => {
    res.text('What you want?', {
        hello: 'Say hello world'
    });
});

const processor = createProcessor(bot, {
    pageToken: 'pagetokenhere',
    appSecret: 'botappsecret',
    autoTyping: true
});

const app = express();

app.use('/bot', createRouter(processor, 'verifyTokenHere'));

mongoose.connect('mongodb://localhost/myapp')
    .then(() => app.listen(3000));

Keywords

Facebook

FAQs

Package last updated on 15 Feb 2018

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