1 | # Brobbot
|
2 |
|
3 | Brobbot is a chat bot, modeled after GitHub's Campfire bot, hubot. He's pretty
|
4 | cool. He's extendable with scripts, and can work on [many different chat services](docs/adapters.md).
|
5 |
|
6 | This repository provides a library that's distributed by `npm` that you
|
7 | use for building your own bots. See the [docs/README.md](docs/README.md)
|
8 | for details on getting up and running with your very own robot friend.
|
9 |
|
10 | ## Forked from Hubot
|
11 |
|
12 | Brobbot was forked from Hubot. The main motivation being better support for scripts with persistent storage.
|
13 |
|
14 | ### Key differences
|
15 |
|
16 | #### Loadable brain modules
|
17 |
|
18 | Brobbot's brain can be a simple Javascript object held in-memory (the deafult `dumb` brain), but you can also load a different brain module to enable a large, fast, persistent brain.
|
19 | Brobbot's brain operations return promises to make your async code nice and clean.
|
20 | Each module gets its own keyspace within the brain, so modules don't have to worry about clobbering each others' data.
|
21 | Brain modules can also provide a `ready` promise in order to signal that the brain is connected/authenticated/whatever it needs to do before it's ready.
|
22 | Check out [the brain docs](docs/brains.md) for more info.
|
23 |
|
24 | To load a brain module, use the `-b` switch when running `bin/brobbot`. e.g.
|
25 |
|
26 | ```bash
|
27 | bin/brobbot -b redis
|
28 | ```
|
29 |
|
30 | #### Message queues
|
31 |
|
32 | Brobbot maintains a message queue for each message handler, which means your handler can opt to process one message at a time with no concurrency.
|
33 |
|
34 | #### Improved listener regex matching
|
35 |
|
36 | Brobbot removes its name from the beginning of messages addressed to it before testing regexen against the message. This means that you can safely use anchors (`^`) at the beginning of your `respond` regex, which helps reduce false-positives.
|
37 |
|