A simple bot that gives users roles according to the activity they are doing.
The idea of the bot is simple and useful, when a user starts playing a game, the bot automatically gives the user the role. Once a user stops playing a game, the role is removed.
# Clone the repository
git clone https://github.com/kennedysmartins/GameRolesBot.git
# Enter into the directory
cd GameRolesBot/
# Install the dependencies
npm install
After cloning the project and installing all dependencies, you need to add your Discord API token in the config.json file.
In app.js, there is a part that you must add the game you want to monitor, and put the role ID you created in your discord server.
"VALORANT": {
name: "valorant", //NAME ROLE TOLOWERCASE
id: '735224527851618396' //ROLE ID
},
You must manually enable the intents from the Discord Developer site (https://discord.com/developers/applications/). Select your app, and find the "bot" tab on the sidebar. Then you can scroll down until you see this:
node app.js
or
run #start.bat
Kennedy Martins (KillerDogs)