This is a Discord Bot created to manage server for computer science students of the Faculty of Applied Informatics and Mathematics at the Warsaw University of Life Sciences (2021/2025).
Python version: 3.10.X
CREATE THE DISCORD SERVER
- On the left side of the Discord, click
+to add a server - Select
Create your ownand skip the next question - You can name the server or add an icon
- Click on
create - Enable
developer modein Discord (go to user settings and selectadvancedcategory)
CREATE AND ADD A BOT TO SERVER
- Go to https://discord.com/developers/applications and click on
New Application - Enter the name you want
- Choose
Boton the left side - Click on
Add Botand thenYes, do iton the next page - Then turn on
Presence intent,Server members intentandMessage content intents - Next to the bot icon, click
reset tokenand copy the bot token for later - On the left side, choose
OAuth2andURL Generator - In
skopesselectbot, inbot permissionschooseAdminstrator - Copy and paste the link below into the search bar
- Choose your server
- Click on
continueandauthorizewithout unchecking theAdministratorbox - Pass the hCaptcha
START THE BOT
- Make sure you have the correct version of python installed :)
- Clone the repository
- Create a
.envfile in the root directory of the repository - Add this line to
.env:BOT_TOKEN= /bot token copied in step 6 of previous topic/ - Initialize the virtual environment:
- Open the console in the bot folder
- Install virtualenv, if you don't have it - type
pip install virtualenvin the console - Enter
virtualenv .venvin the console - Enter
source .venv/bin/activatein the console to activate virtualenv
- Install the requirement packages:
- Make sure the virtual environment is selected
- Type
pip install -r requirements.txtin the console
- Enter
py main.pyin the console to run the bot.