A modular slackbot
Ferd is a modular Slack Bot. It abstracts away the complexity of the Slack Real-Time Messaging API. Use this repo as an open source project to build your own bots, or check out FerdX for some fun.
To Run
Uses ES6. Runs using node --harmony
var ferdModule = ;var Ferd = ; var ferd = ; //create new ferd instanceferd; //inject module into ferdferd; //bot starts listeningferd; //bot stops listening
Creating Ferd Modules
To create modules, use the following syntax:
/* All variables in this closure are accessible by all bots using this module */var randomYo = "whats up? " "hey " "yo ";var { return randomYoMath;}; module { /* All variables in this closure are accessible to all listeners in this module */ var yoCount = 0; /* Listens to all messages */ ferd; /* Listens to messages tagged with bot's name or mentions bot */ var listener = ferd; /* Stops listening on specific listener */ ferd; /* Say 'hello' to join session and 'goodbye' to leave session. * Use to create poker and trivia games. */ ferd; /* Get all mentions of `yo` since bot's initialization */ ferd;};
Slack types
For more information on Slack types, check out https://api.slack.com/types.
Contributing
For contributing, see the contributing guidelines.
Style Guide
If you're contributing, make sure to check out the style guide.
Team
- Nick Salloum nick@callmenick.com
- Timothy Quach timothyquachbot@gmail.com
- Andrew Kishino AndrewKishino@gmail.com
- David Rosson david@rosson.com.au
License
MIT