How can you play chess on any device?
This project gives you a turn key solution for tranforming slack into a chess client. With slackchess you can:
- challenge another slack user
- play against @slackbot powered by Stockfish
- offer draws and resign
- export your game as a PGN
To start the Slack Integration Guide you will need the IP or URL of your server. If you don't already have a place to host slackchess, you can follow the Digital Ocean Setup Guide first. After the Slack Integration is setup, you should follow the Server Setup Guide. The Server Setup Guide will guide you through pulling down the docker image and running it as a container.
Digital Ocean Setup Guide
- Signup for Digital Ocean if you don't have an account (https://m.do.co/c/f4609bed935c referal link to get $10 free)
- Click Create Droplet
- Select One-click Apps > Docker
- Choose smallest size
- Make sure to add your SSH keys (if you need help click "New SSH Key > How to use SSH keys")
- Select 1 droplet
- Click Create
Slack Integration Guide
- Login to Slack and go to https://slack.com/apps
- Go to Configure > Custom Integrations > Slash Commands > Add Configuration
- For "Choose a Command" type "/chess" and press "Add Slash Command Integration"
- Set "URL" to http://126.96.36.1991/command where "188.8.131.521" is your IP
- Make sure "Method" is POST
- Copy and paste the generated "Token" somewhere, you will need it later
- For "Customize Name" you can enter anything (ex. "ChessBot")
- For "Customize Icon" I used this image: https://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Chess_kdt45.svg/45px-Chess_kdt45.svg.png
- Click "Save Integration"
Server Setup Guide
If you added your SSH keys to your local machine (you should have in the Digital Ocean Setup Guide), you can SSH into your machine. Replace "184.108.40.2061" with your IP.
Pull down the docker image from Docker Hub.
docker pull loganjspears/slackchess
Create and run a docker container with your information. Replace "R546Sk2RoZiAXZltssJ4WfEO" with your Slack token. Replace "220.127.116.111" with your IP.
docker run -d -p 80:5000 -e TOKEN=R546Sk2RoZiAXZltssJ4WfEO -e URL=http://18.104.22.1681 loganjspears/slackchess
If everything worked the ps command should show the container running.
Play against user:
/chess play @user
Play against bot:
/chess play @slackbot
You can view all commands by using the help command.