Start a game in any channel or private group and play with a friend.
Written for fun and to practice new features found in the new ECMAScript 6 JavaScript standard.
Inspired by @CharlieHess/slack-poker-bot.
- Create a new bot integration here
- Run the bot locally or have it running on a heroku server
- Start a game using:
@<bot-name>: start
- Follow the instructions the bot gives you in Slack
- Type
quit
to abandon a game
$ git clone git@github.com:wgpsutherland/slack-connect-4-bot.git && cd slack-connect-4-bot
$ npm install
$ npm start
Create token.txt
in the root directory and paste in the API token given when creating your bot integration.
$ heroku create
$ heroku config:set SLACK_CONNECT_4_BOT_TOKEN=[Your API token]
$ git push heroku master
Alternatively, you can deploy your own copy with one click using this button:
See the Heroku documentation for more info about changing the configuration variables after deployment.
If you are using the free version of Heroku, the bot will turn itself off after a while and will not respond to any commands on Slack. You can see if this has happened by the circle next to the bot's name in Slack being empty and grey, instead of green. Simply navigate in your browser to heroku-bot-name.herokuapp.com, and the bot will come online again.
Tests can be run using npm test
.
Start a game using: @<bot-name>: start boo
or @<bot-name>: start xmas
to play Connect 4 with a festive spin.