Hubot is a fantastic project that enabled us to build great bots. The aim of this project is twofold:
- Provide an "empty" project to build your own Slack chat bot
- Provide example implementation of tool(s) / commands that run on ES6 (instead of Coffee-script).
Starting this project is really easy:
- Fork this project (top right corner)
- Clone your forked project to your pc.
- Goto http://slackapi.github.io/hubot-slack/#getting-a-slack-token to read up on how to get a Slack token for your bot.
- Add the token to your environment.
- Start the bot from the terminal using
npm start. - Enjoy!
Packages
We've included some packages:
axios: a promise-based HTTP client. Makes it easier to use promises of your HTTP requests.dotenv: allows you to store environment variables in the .env file in the root of the project.hubot-command-mapper: allows for the mapping of commands with parameters to the Hubot without the need for regular expressions.
NPM
Use NPM to interact with the bot:
npm startwill start the bot.npm testwill kick of the tests of the bot. They are located in thetestsdirectory. Testing is done using Hubot Pretend.
Clean up
The bot was generated using the Slack Developer Kit for Hubot. It was "cleaned" using a script from Cleaning up the Default Hubot Installation.
We're using the following stack:
- NodeJs
- ES6
- Hubot
- NPM