This is a Discord bot written in Haskell that runs in a Docker container on a free Heroku worker dyno and allows the users to play an ASCII connect four game against a KI by using chat commands.
Checkout the connect-four discord test server: https://discord.gg/uGee5KxB
!newgame
- start a new game!move <X>
do your move where<X>
is a number [1-7]!show
yield current state again
- Heroku Toolbelt
- Docker up and running
- Haskell Tool Stack
After creating a discord bot and adding it to your server follow these steps:
- Create a heroku app
- Setup a postgres database
- Supply database environment variables in
production.env
-- for reference seeexample.env
.TOKEN
environment variable is - Deploy by
> $ make deploy
. This will take a while at first, future deploys will run faster (seeDockerfile
). - Make sure herokus dyno is properly configured
> $ heroku ps:scale web=0 worker=1
- Have fun!
- win against KI
- make difficulty selectable per user
- add a multiplayer mode that allows playing against other users.
- control by reactions than commands
- play game in place by editing original message
- replace
X
andO
characters by colored symbols - cleaner code