https://github.com/gasolin/webbybot
chatterbot written in es6 (es2015), fork from hubot
https://github.com/gasolin/webbybot
bot chat chatbot hubot
Last synced: about 1 year ago
JSON representation
chatterbot written in es6 (es2015), fork from hubot
- Host: GitHub
- URL: https://github.com/gasolin/webbybot
- Owner: gasolin
- Created: 2016-02-09T13:17:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-12-28T07:33:10.000Z (over 5 years ago)
- Last Synced: 2025-04-08T11:03:14.928Z (about 1 year ago)
- Topics: bot, chat, chatbot, hubot
- Language: JavaScript
- Homepage:
- Size: 175 KB
- Stars: 68
- Watchers: 6
- Forks: 11
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Webbybot
**THIS PROJECT IS NOT MAINTAINED, please consider [Hubot](https://github.com/hubotio/hubot) or my client-side attempt [Saihubot](https://github.com/gasolin/saihubot) **
[](https://travis-ci.org/gasolin/webbybot) [](https://codecov.io/github/gasolin/webbybot?branch=master) [](https://david-dm.org/gasolin/webbybot) [](https://www.npmjs.com/package/webbybot)
[](https://gitter.im/gasolin/webbybot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[Webbybot](https://github.com/gasolin/webbybot/) is the next generation framework to build message/chat bots, written in ES6 and plain javascript.
Fully compatible with [Hubot](https://github.com/github/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](https://github.com/github/hubot/blob/master/docs/implementation.md)(for now)
* Support write plugin with plain Javascript
## How to try Webbybot
You can start from [webby-template](https://github.com/gasolin/webby-template) , a template for make a working webby bot
```shell
$ 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](https://www.npmjs.com/search?q=hubot)
Enable a skill in `external-scripts.json`.
Add the environment variables in [.env](https://www.npmjs.com/package/dotenv) file.
## How to replace Hubot to Webbybot
Refer to [Getting Started With Hubot](https://hubot.github.com/docs/),
Install hubot generator first
```shell
npm install -g yo generator-hubot
```
Then generate your robot with
```shell
yo hubot
```
1. Enter the folder, edit `bin/hubot` and replace `hubot` to `webby`.
2. install webbybot package
```shell
npm install --save webbybot
```
3. 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
```shell
./bin/hubot
```
Tested with `hubot-telegram` and `hubot-messenger`.
## Development
```shell
$ npm install -g mocha
```
### Build
run command
```shell
$ npm run build
```
### Add plugins
```shell
$ npm install hubot-calculator hubot-diagnostics
```
Add external-scripts.json file which contain:
```javascript
[
"hubot-diagnostics",
"hubot-calculator"
]
```
### Run
run command
```shell
$ node ./bin/webby
webby > ping
webby > PONG
webby > echo hello
webby > hello
webby > webby calc 1 + 1
webby > 2
```
### Test
```shell
$ npm test
```
### Lint
```shell
$ npm run lint
```
### Write your own plugin
You can clone [webby-plugin](https://github.com/gasolin/webby-plugin) template to get start.
[webby-template](https://github.com/gasolin/webby-template) already bundled with webby-plugin. You can check how it work for reference.
## License
[MIT license](https://en.wikipedia.org/wiki/MIT_License)