First, clone the repository to your local machine:
Linux and Windows:
git clone https://github.com/BLACKUM/rtca-bot-hypixel.git
cd rtca-bot-hypixelBefore running, you need to set up your Discord bot token:
-
Create the secrets file:
Linux:
cp core/secrets.example.py core/secrets.py
Windows:
copy core\secrets.example.py core\secrets.py -
Edit
core/secrets.pyand add your Discord Bot Token:TOKEN = "your_discord_bot_token_here"
Get your token from: https://discord.com/developers/applications
Note: The core/secrets.py file is not tracked by git for security reasons.
-
Make the script executable:
chmod +x run.sh
-
Run the bot:
./run.sh
The script will automatically create a virtual environment and install all dependencies.
- Double-click on
run.bator run from command prompt:run.bat
- Open PowerShell in the project folder
- If you get a script execution error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Run the script:
.\run.ps1
Linux:
python3 main.pyWindows:
python main.pyLinux and Windows: Make sure you have Python 3.8+ installed:
python3 --version(Or python --version on Windows)
Install dependencies manually (if needed):
pip3 install -r requirements.txtThe run.sh script now automatically handles tmux sessions for you.
-
Make the script executable (first time only):
chmod +x run.sh
-
Simply run the script:
./run.sh
- If you are NOT in a tmux session, it will create one named
rtcaand attach you to it. - If the session already exists, it will attach you to it.
- Inside the session, the bot runs in a loop. If it crashes or is restarted via the Admin Panel, it will auto-restart.
- If you are NOT in a tmux session, it will create one named
-
Detach from session: Press
Ctrl+B, thenD. -
Reattach later:
./run.sh
(Or manually:
tmux attach -t rtca) -
Stop the bot:
- Use
/admin-> System -> Shutdown in Discord. - Or press
Ctrl+Cinside the tmux session window.
- Use
To update the bot to the latest version:
- Stop the bot
- Pull the latest changes:
git pull origin main
- Restart the bot