Frisket is a Slack chat bot that listens to your conversations on Slack and responds or reacts like a dog. If you mention certain words he'll get excited. He'll talk back or fetch. He even knows how to use emoticons!
This bot is free to run but comes with limitations. If you plan to use the free tier on Heroku, the bot will sleep after an hour unless you actively ping the server.
Frisket is based on Ein, which is a chat bot built off the [Hubot][hubot] framework intented to interact like a dog.
Download a copy of the project. Open a terminal and change directory to where you wish to store the project.
git clone https://github.com/grevory/slack-office-dog-bot.git
cd slack-office-dog-bot
Install the projects dependecies
npm install
Test that Hubot is functioning as expected
bin/hubot
If it worked you should see "slacky> [Date]". There may be some errors and warnings but they may not be of consequence. Feel free to play with Hubot here.
slacky> slacky help
Exit out of Hubot (CTRL / CMD + C)
If you are not already logged into Heroku on the command line
heroku login
git add .
git commit -am "Initial commit"
heroku create --stack cedar
git push heroku master
This will return the domain of your bot as hosted on Heroku. You will need to use this URL to wake your bot.
Login to Slack and got to https://slack.com/apps/build. Click on "Make a Custom Integration" and then "Bots".
Create a username for your bot. Might we recommend "@frisket"? Upload your photo. You can find one in this repo at ./frisket.png.
Copy the API Token and go back to your terminal window.
heroku config:set HUBOT_SLACK_TOKEN=xoxb-1234567890-XXXXXXXXXXXXXXXXXXX
Get the URL of your bot in case you forgot it.
heroku apps:info
To keep your bot from going to sleep
heroku addons:create scheduler:standard
heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=xxx-yyyy.herokuapp.com
heroku addons:open scheduler
This will open a dashboard to manage the scheduling. For the command enter curl ${HUBOT_HEROKU_KEEPALIVE_URL}heroku/keepalive
and set the reset of the inputs as you like.
Look at heroku logs
or try running heroku restart
.
If you run into any problems, checkout the Heroku docs or Hubot docs.