The bot used for administration and moderation in K4scripts Discord.
This bot is written in Python 3.11.0 and uses the Pycord library.
Variable | Description | Default |
---|---|---|
TOKEN |
The bot token used to authenticate with Discord | |
GUILD_ID |
The ID of the guild to use (for debugging) | |
LOGGING_LEVEL |
The level of logging to use | 2 |
STAFF_ROLE_ID |
The ID of the staff role |
Level | Description |
---|---|
1 | DEBUG |
2 | INFO |
3 | WARNING |
4 | ERROR |
5 | CRITICAL |
Set the environment variables in a .env
file in the root of the project.
- Create a virtual environment
python3.11 -m venv .venv
- Activate the virtual environment
source .venv/bin/activate
- Install the required packages
pip install -r requirements.txt
- Run the bot
python3.11 src/main.py
- Build the Docker image
docker build -t k4bot .
- Run the Docker container
docker run -d --env-file .env --name k4bot k4bot