A program that lets twitch chat play chess against a bot. Watch it in action here!
You will need an affiliate/partnered Twitch account.
-
Go to https://twitchtokengenerator.com/ and select "Custom Scope Token". In "Available Token Scopes" add scope to
chat:read
,chat:edit
,channel:manage:polls
, andchannel:read:polls
. Click generate token and save the information. -
In the .env file, paste your Access Token after
BOT_TOKEN=
. Then enter your twitch ID and twitch username afterUSER_ID=
andUSER_NAME=
, respectively. Finally enter your twitch username afterCHANNEL=
. -
cd into the twitchchess folder
-
In your python virtual enviornment (I used Anaconda), run
$ pip install -r requirements.txt
. -
Start the bot by entering
$ python twitchchess.py
.
!init [color] [time]
- For this command, color is either "black" or "white" and time must be between 15 and 1800 seconds. By default, color is white and time is 15.
!play
- Starts the game.
!quit
- Stops the game.