stendapps-vott-messenger

0.0.1 • Public • Published

Vott for Messenger

npm License:MIT Build Status Coverage Status Dependency Status

Vott for Messenger (i.e. vott-messenger) is a minimal, extensible framework for building Messenger bots.

Features

  • Fully extensible conversational flow (inbound/outbound middleware, event dispatcher middleware, and plugins)
  • Serves multiple pages from a single instance
  • Scoped questions for complex conversational trees
  • Bring your own "hears" method *
  • Custom persistence layer (i.e. datastore) *
  • Thoroughly tested

* In order to keep vott as unopinionated as possible, the framework makes no assumption on persistence layers or hears methods. This reduces framework complexity and allows developers to have full control and understanding of the datastore.

Installation

$ npm install --save vott-messenger

Quick Example

const MessengerBot = require('vott-messenger')
 
/** instantiate MessengerBot */
const myBot = new MessengerBot({
  access_token: process.env.FB_PAGE_ACCESS_TOKEN,
  verify_token: process.env.FB_VERIFY_TOKEN
})
 
/** usage example: */
myBot.on('message_received', (bot, event) => {
  bot.chat(event, (chat) => {
    chat.say('Hello!')
    chat.ask('How are you?', (res, chat) => {
      chat.save({ user_status: res.text })
      chat.say('Ok')
      chat.next()
    })
    chat.next()
  })
})

Documentation

Documentation, guides, and API reference coming soon. :)

Contributing

Dev Dependency Status Code-Style:Standard

Bug Reports & Feature Requests

Something does not work as expected or perhaps you think this module needs a feature? Please open an issue using GitHub's issue tracker. Please be as specific and straightforward as possible.

Developing

Pull Requests (PRs) are welcome. Make sure you follow the same basic stylistic conventions as the original code. Your changes must be concise and focus on solving a single problem.

Installation Instructions [for Contributors]

Clone the repo:

$ git clone git@github.com:krismuniz/vott-messenger.git

Install all dependencies and run tests:

$ npm install && npm test

License

The MIT License (MIT)

Copyright (c) 2016 Kristian Muñiz

Package Sidebar

Install

npm i stendapps-vott-messenger

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • stendapps