Install Manually
Prerequisites
Ensure you have the following installed:
Git (you have one of two options)
-
(Option 1) Install homebrew and run:
brew install git
. -
(Option 2) Install MacPorts and run:
sudo port install git
.
Python
- Visit the download page for python.
FFmpeg
- Install homebrew and run:
brew install ffmpeg
.
Setup
Open a terminal and follow the steps below.
Clone the repository:
git clone https://github.com/Wesley-Playz/rulekeeperbot.git
cd rulekeeperbot
Create a Discord Bot:
-
Go to Discord Developer Portal.
-
Create a new application and set up your bot.
Set up environment variables:
- Create a
.env
file in the project root:
BOT_TOKEN=GET_FROM_DISCORD_DEVELOPER_PORTAL
SECRET_KEY=REPLACE_WITH_A_RANDOM_STRING
HEAD_BOT_ADMIN_USERNAME=Admin
HEAD_ADMIN_PASSWORD=CHOOSE_A_VERY_STRONG_PASSWORD
FRONTEND_URL=http://localhost:5000
API_URL=http://localhost:5003
DISCORD_CLIENT_ID=GET_FROM_DISCORD_DEVELOPER_PORTAL
DISCORD_CLIENT_SECRET=GET_FROM_DISCORD_DEVELOPER_PORTAL
DATABASE_PATH=bot/bot.db
ENABLE_LEVELING=true
ENABLE_MODERATION=true
ENABLE_APPEALS=true
TWITCH_CLIENT_ID=GET_FROM_TWITCH_DEVELOPER_CONSOLE
TWITCH_CLIENT_SECRET=GET_FROM_TWITCH_DEVELOPER_CONSOLE
YOUTUBE_API_KEY=GET_FROM_GOOGLE_CLOUD_CONSOLE
Replace all placeholder values (like GET_FROM_DISCORD_DEVELOPER_PORTAL) with the actual values from your Discord Developer Portal.
⚠️ Never share your .env file publicly — it contains sensitive secrets!
Running the Bot and Dashboard
- Make the virtual environment:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Run the bot:
python main.py
Note: If you get errors about
python
being version 2.x, always usepython3
instead.Note: If you edit any files after starting the bot, restart it to apply the changes.
Once running, access the dashboard:
-
Local access: http://localhost:5000
-
Remote access: http://OtherPCsIPAddress:5000