Snarl is a powerful chatbot built with Doorman, Maki, and the Fabric Protocol. Currently, he's running things over in the Fabric Chat, but you can also add him to Slack, Discord, and/or Matrix.
Despite his name, snarl is just a fuzzy and friendly goofball. He's been with us for several years, since the beginning of the Coding Soundtrack community. He's an awesome automaton that helps us with a great many things, so be nice to him.
Avatar for snarl is by @yiyinglu, who designed the original avatars for tuntable.fm.
To connect with Slack, Discord, or Matrix, you'll need an access token for each
service. Once acquired, add them to config.json
.
- Install via
npm install snarl -g
, or simply clone1 this repository and runnpm install
as usual. - Modify
config.json
to suit your needs (see paragraph above). - Execute
npm start
in the source directory, orsnarl
if you installed globally.
That's it. You'll see snarl come online! If you install snarl globally via
npm install snarl -g
, you can also simply type snarl
at any time (for example,
inside of a screen or a tmux session) to run the bot.
1: if you want to make modifications, you should fork it first!
If you want to give snarl a different name, you can configure it via Slack (see
link above), or add a name
property to config.json
.
Snarl comes pre-configured with several convenient plugins, but more can be
enabled by adding them to the plugins
list in config.json
.
The list of available plugins (via ./plugins/plugin-name
) is as follows:
welcome
, which provides a welcome message to users joining specified channels.erm
, which transforms the text of a user message intoERMEGERD
speech using martindale/erm.
- snarl-eliza is a simple AI using the ELIZA self-help chatbot created by Joseph Weizenbaum between 1964 and 1966.
- snarl-wine-lookup is a simple plugin for performing wine-lookups via the snooth wine api, using the !vino command and several optional parameters. Cheers!
To write a snarl plugin, create a new NPM module that exports a map of triggers your bot will respond to. You can use either a simple message string, or a function that expects a callback:
Snarl has a long history, and we'd like to keep him up to date — so we've deprecated the following plugins as to focus on core functionality.
karma
, which keeps track of user karma, as incremented by@username++
.facts
, which provides!TopologyFacts
(mathematical topology facts),!SmiffFacts
(facts about Will Smith), and!InterstellaFacts
(facts about Interstella 5555)meetups
, which responds with a simple message telling your community about in-person meetups.beer-lookup
, which provides!brew <beerName>
to look up and describe a beer via BreweryDB.
Feel free to submit a pull request if you'd like to make an improvement!