UNPKG

1.75 kBMarkdownView Raw
1# Brobbot
2
3Brobbot is a chat bot, modeled after GitHub's Campfire bot, hubot. He's pretty
4cool. He's extendable with scripts, and can work on [many different chat services](docs/adapters.md).
5
6This repository provides a library that's distributed by `npm` that you
7use for building your own bots. See the [docs/README.md](docs/README.md)
8for details on getting up and running with your very own robot friend.
9
10## Forked from Hubot
11
12Brobbot 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
18Brobbot'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.
19Brobbot's brain operations return promises to make your async code nice and clean.
20Each module gets its own keyspace within the brain, so modules don't have to worry about clobbering each others' data.
21Brain 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.
22Check out [the brain docs](docs/brains.md) for more info.
23
24To load a brain module, use the `-b` switch when running `bin/brobbot`. e.g.
25
26```bash
27bin/brobbot -b redis
28```
29
30#### Message queues
31
32Brobbot 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
36Brobbot 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