Gamba is a Discord bot to create predictions based on Twitch Channel Points Predictions.
You can invite Gamba to your Discord server. Or, you can download the source code and run the bot yourself.
Use the latest package manager Node.js to install Gamba.
npm install npm@latest -g
Create or have an existing Discord account at Discord.
- Log in to the Discord Developer Portal.
- Click on the "New Application" button located at the top right.
- Give the application a name and click
Create
. - Under
Bot
, copy theToken
of the bot. - Locate
Privileged Gateway Intents
, and enablePresence Intent
andServer Members Intent
. - Under
OAuth2 > General
, copy theClient ID
of the bot. - Under
OAuth2 > URL Generator
, selectbot
andapplication.commands
for scopes andAdministrator
for bot permissions. Copy the generated URL at the bottom of the page. - Clone the repository:
git clone [email protected]:tobyjzstay/Gamba.git
- Install NPM packages in the cloned repository:
npm install
- Create a file named
config.js
at the root level and copy the following:{ "clientId": "<Client ID>", "token": "<Token>", "path": { "points": "./data/points/", "predictionsActive": "./data/predictions/active/", "predictionsArchive": "./data/predictions/archive/" } }
- Run the bot:
npm start
- Invite the bot to your Discord server with the generated URL.
Command | Description |
---|---|
/gamba |
Lists all active predictions |
/points [user] |
Get points |
/leaderboard [role] [results] |
Show points leaderboard |
/predict <id> <index> <amount> |
Predict with points |
/prediction <id> |
Show a prediction |
/create <name> <option1> <option2> [minutes] [hours] [days] |
Create a new prediction |
/close <id> |
Close a prediction |
/end <id> <index> |
End a prediction |
/cancel <id> |
Cancel a prediction |