Forked from/heavily based on AndrewYatzkan/Twitch-Prediction-Lichess to allow Twitch affiliates/partners to manage predictions.
-
Install Node.js.
-
Download Twitch-Prediction-Lichess and navigate to the folder in Terminal (Mac/Linux) or Command Prompt (Windows).
-
Create Twitch application with scopes
channel:read:predictions channel:manage:predictions
.
- You can generate the Twitch OAuth token here.
-
Create a Lichess Board API token.
-
Copy or rename the
config.sample.js
file toconfig.js
and adjust the values:
module.exports = {
LICHESS_API_TOKEN: 'lip_...', // Lichess Board API token
TWITCH_API_CLIENT_ID: '', // Twitch API client ID
TWITCH_API_TOKEN: '', // Twitch API token (without "oauth:" prefix)
TWITCH_CHANNEL: '', // Twitch username (affiliate/partner only)
PREDICTION_PERIOD: 60, // Maximum duration for prediction to remain open in s
};
-
Run
npm start
to start the bot. -
Play games. Twitch predictions will automatically be created and resolved!
- Note: correspondence games and hosting a simultaneous exhibition are not currently supported.