This is a Discord bot built using Discord.js.
-
Clone the repository to your local machine:
git clone https://github.com/STV-Informatik-Salzburg/STV-Informatik-Bot
-
Navigate into the project directory:
cd STV-Informatik-Bot -
Install dependencies using npm:
npm install
-
Create a Discord application and bot on the Discord Developer Portal.
-
Copy the bot token provided by Discord.
-
Create a
.envfile in the root directory of the project, by copying the existing.env.examplefile. -
Add your bot token to the
.envfile:DISCORD_TOKEN=your-bot-token-goes-here
- Navigate to the "OAuth2" tab of your application on the Discord Developer Portal.
- Under "OAuth2 URL Generator", select the "bot" scope and the "Administrator" permission.
Note: For now its admin, but in the future we will change it to the required permissions.
- Copy the generated URL and paste it into your web browser.
- Select the server you want to add the bot to and click "Authorize".
-
In discord, go to the settings and under "Advanced" enable "Developer Mode".
-
Right click on the Server, you added the bot to and click "Copy ID".
-
Paste the ID into the
.envfile:GUILD_ID=your-cuild-id-goes-here
-
Click on the server and open the Member list.
-
Right click on the bot and click "Copy ID".
-
Paste the ID into the
.envfile:CLIENT_ID=your-bot-id-goes-here
This bot is using the slash commands feature of discord.js. To deploy the commands, use the following command inside the project directory:
npm run deploy-commandsTo run the bot, use the following command:
node .The bot should now be online and active in your Discord server.
Contributions are welcome! If you'd like to contribute to this project, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License.