3.2.4 • Published 8 years ago

webbybot v3.2.4

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Webbybot

Build Status codecov.io Dependency Status npm Join the chat at https://gitter.im/gasolin/webbybot

Webbybot is the next generation message/chat bot framework written in ES6 and plain javascript. Fully compatible with Hubot's middleware and plugins.

The Differences:

  • Port hubot from coffeescript to es6 (plain JS) with babel.
  • Auto test coverage report with Codecov.
  • Auto linting with eslint.
  • Support .env file to setup system parameters
  • robot.router upgraded to Express 4.x

The Same:

  • Still support hubot plugins written in coffeescript.
  • Can reuse hubot adapters*
  • Auto continue integration with Travis CI.
  • How it works(for now)
  • Support write plugin with plain Javascript

How to try Webbybot

You can start from webby-template , a template for make a working webby bot

$ git clone https://github.com/gasolin/webby-template.git demo
$ cd demo
$ npm install
$ ./bin/webby

You can find and install extra skills from npm

Enable a skill in external-scripts.json.

Add the environment variables in .env file.

How to replace Hubot to Webbybot

Refer to Getting Started With Hubot, Install hubot generator first

npm install -g yo generator-hubot

Then generate your robot with

yo hubot
  1. Enter the folder, edit bin/hubot and replace hubot to webby.

  2. install webbybot package

npm install --save webbybot
  1. modify adapter's dependency

Let's take telegram adapter for example. Edit node_modules/hubot-telegram/src/telegram.coffee and replace first line require 'hubot' to require 'webbybot'.

start your bot as normal

./bin/hubot

Tested with hubot-telegram and hubot-messenger.

Development

$ npm install -g mocha

Build

run command

$ npm run build

Add plugins

$ npm install hubot-calculator hubot-diagnostics

Add external-scripts.json file which contain:

[
  "hubot-diagnostics",
  "hubot-calculator"
]

Run

run command

$ node ./bin/webby
webby > ping
webby > PONG
webby > echo hello
webby > hello
webby > webby calc 1 + 1
webby > 2

Test

$ npm test

Lint

$ npm run lint

Write your own plugin

You can clone webby-plugin template to get start.

webby-template already bundled with webby-plugin. You can check how it work for reference.

License

MIT license

3.2.4

8 years ago

3.2.3

8 years ago

3.2.2

8 years ago

3.2.1

8 years ago

3.2.0

8 years ago

3.1.2

8 years ago

3.1.1

8 years ago

3.1.0

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

0.3.0

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago