TeleWoW is a Windows-first Python Telegram bot for monitoring and controlling a local EmuCoach or TrinityCore Mists of Pandaria repack.
Clone this repository into the repack root directory. The repository folder must be named tele-wow and must sit next to Repack and Database. Relative paths in .env are resolved from the tele-wow folder, so the default paths intentionally use ../Repack and ../Database.
๐ Running TeleWoW on your repack? It's free and open-source, built and maintained in spare time. If it's saved you time monitoring your server โ or you'd like to see it keep growing โ a coffee genuinely helps. See Support the Project.
- Features
- Preview
- Project layout
- Requirements
- Easy install
- Manual setup
- Running the bot
- Buttons
- Remote Access setup
- Auto-restart on crash
- Operational notes
- Support the Project
- License
- Telegram bot with inline keyboard control panel
- User ID whitelist protection
.env-driven configuration- Host stats for CPU, RAM, and disk usage
- Process monitoring for
mysqld.exe,authserver.exe, andworldserver.exe - Crash alerts with one-tap
โถ Start,๐ Restart, and๐ฎ Open Statusbuttons - Optional
AUTO_RESTART_ON_CRASHthat recovers a crashed service plus its downstream dependents - Per-service drill-down panel with PID, CPU%, RAM, uptime, and
โ Force Stop - Start, stop, restart, force-stop, and
๐ Restart Allactions - Remote Access actions for worldserver commands
๐ Graceful Restartwizard: announce โ 60s warning โ save all โ shutdown, with cancel- In-bot account creation through worldserver RA commands
- Confirmation dialogs for risky actions
- Cleaner dashboard-style main panel with reduced bot message clutter
Main dashboard
Server status
Remote Access
Crash alert example
tele-wow/
bot.py
config.py
database.py
install_bot.bat
LICENSE
monitor.py
ra.py
requirements.txt
start_bot.bat
.env.example
screenshots/
TELEGRAM_SETUP.md
- Windows host
- Python 3.11+
- A Telegram bot token from BotFather
- One or more Telegram numeric user IDs for the whitelist
- A WoW repack root folder containing
DatabaseandRepack
Recommended for most users:
install_bot.batWhat the installer does:
- Explains that it only installs the bot, not the WoW repack itself
- Checks that
tele-wowis placed besideDatabaseandRepack - Checks for Python 3.11+ and installs it with
wingetif needed - Creates
.venv - Activates
.venv - Installs the required Python packages
- Creates
.envfrom.env.exampleif.envdoes not already exist
What you still need to do after the installer finishes:
- Open TELEGRAM_SETUP.md and create your Telegram bot.
- Edit
.envand fill in your Telegram values. - Review the default
../Repackand../Databasepaths in.env. - Enable RA in
Repack\worldserver.confif you want Remote Access features. - Start the bot with
start_bot.bat.
The installer does not overwrite an existing .env, and it reuses an existing .venv if one is already present.
-
Clone this repository into your repack root folder and make sure your structure looks like this:
Database/ Repack/ tele-wow/ -
Open a terminal inside the
tele-wowfolder. -
Create and activate a virtual environment on Windows:
python -m venv .venv .\.venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Copy
.env.exampleto.env. -
Keep the
tele-wowfolder in the repack root directory so the default../Repackand../Databasepaths stay valid. -
Follow the Telegram setup guide in TELEGRAM_SETUP.md to create your bot, get the token, and find your Telegram user IDs and chat ID.
-
Fill in these values in
.env:TELEGRAM_BOT_TOKENTELEGRAM_ALLOWED_USER_IDSTELEGRAM_ALERT_CHAT_ID- Server executable and working-directory paths if your installation differs
RA_HOST,RA_PORT,RA_USERNAME,RA_PASSWORD, andRA_TIMEOUT_SECONDSif you want Remote Access features- Database connection settings if they differ from the default repack config
The default .env.example uses repo-relative paths such as ../Repack/worldserver.exe and ../Database/_Server/MySQL.bat, so it stays portable across different install locations.
python bot.pyWindows launcher:
start_bot.batThe bot polls Telegram, schedules a 15-second heartbeat, and sends crash alerts to the configured chat ID.
start_bot.bat changes to the repo folder, activates .venv, and then runs python bot.py. This makes it suitable for double-click launch or for Windows Task Scheduler.
Task Scheduler note:
- Point the task to
start_bot.batinside thetele-wowfolder - Set
Start into thetele-wowfolder
First run flow:
- Start the bot with
python bot.py. - Open Telegram and search for the bot username you created in BotFather.
- Open the bot chat and press
Start. - Send
/whoamito read your Telegram User ID and Chat ID. - Add that User ID to
TELEGRAM_ALLOWED_USER_IDSin.env. - Add that Chat ID to
TELEGRAM_ALERT_CHAT_IDif you want alerts in that chat. - Restart the bot.
- Send
/startor/menuto open the control panel and enable the fixed navigation keyboard.
Before the whitelist is configured, only /whoami and /debugid are expected to work.
The bot tries to keep one main control-panel message updated instead of sending a new panel message for every action.
After the first authorized /start or /menu, the bot also enables a fixed reply keyboard with safe shortcuts for ๐ Menu, ๐ฎ Status, ๐ Stats, and ๐ Remote.
Main panel (2x2 inline keyboard):
๐ฎ Server Status: PID, uptime, and memory for MySQL, AuthServer, and WorldServer๐ System Stats: host CPU, RAM, disk, and uptime for the monitored pathโก Quick Actions: per-service drill-down with Start, Stop, Restart, Force Stop, plus๐ Restart All๐ Remote Access: RA-backed worldserver commands (โน Server Info,๐พ Save All,๐ฃ Announce,๐ Shutdown,๐ Graceful Restart,๐ค Account Creator)
Fixed reply-keyboard shortcuts (always visible):
๐ Menu: return to the main dashboard panel๐ฎ Status: open the server status panel๐ Stats: open the system stats panel๐ Remote: open the Remote Access panel
Quick Actions per-service rows:
- Offline service: one-tap
โถ Start - Online service: opens a drill-down with PID, CPU%, RAM, uptime, plus
๐ Stop,๐ Restart,โ Force Stop
Slash commands:
/start,/menu: open the main panel and enable the reply keyboard/status,/stats: jump straight to status or stats panels/whoami,/debugid: print your Telegram User ID and Chat ID/help: list commands and wizard tips
Crash alerts include one-tap โถ Start, ๐ Restart, and ๐ฎ Open Status buttons.
Confirmation steps are required for stop, restart, force-stop, shutdown, restart-all, graceful-restart, and account-creation. Announce sends immediately without a confirmation step.
๐ Remote Access > ๐ Graceful Restart chains an announce, a 60-second final warning, a saveall, and a server shutdown 0. The wizard prompts for a delay (in seconds) and an announcement template โ send default to use the values from .env. While running, the panel shows progress and offers โ Cancel Restart, which sends a "restart cancelled" announcement and removes the pending jobs.
Defaults are configured via:
GRACEFUL_RESTART_DEFAULT_DELAY_SECONDS=300
GRACEFUL_RESTART_DEFAULT_TEMPLATE=Server restart in {minutes} minutes - please log out safely.
The {minutes} token is replaced with the rounded countdown.
Remote Access (RA) is used for worldserver command execution such as announcements, account commands, and server commands.
The current basic process-control features do not require RA, but any remote worldserver command feature does.
RAmust be enabled inRepack\worldserver.confworldserver.exemust be running- You need an existing WoW account for
RAlogin - That account must have a high enough security level for
Ra.MinLevel
Check the CONSOLE AND REMOTE ACCESS section in Repack\worldserver.conf.
These settings matter:
Ra.Enable = 1
Ra.IP = "127.0.0.1"
Ra.Port = 3443
Ra.MinLevel = 3
Notes:
Ra.Enable = 1enables the remote consoleRa.IP = "127.0.0.1"is recommended when the bot runs on the same machine as the serverRa.MinLevel = 3means the login account must have security level3or higher
RA cannot be used until you already have a privileged account.
The first account is usually created from the local worldserver console window, not through RA itself.
Typical bootstrap flow:
- Start
worldserver.exe - Open the local worldserver console window
- Create an account
- Grant that account a GM or admin level high enough for
RA - Use that account later for
RAlogin
Typical commands are:
account create myadmin mypassword
account set gmlevel myadmin 3 -1
Important:
- Command syntax can vary slightly between core versions
- If your core uses a different account permission command, use the equivalent command available in your console
-1commonly means all realms on Trinity or SkyFire style cores
Once RA is configured, it can be used for commands such as:
- server announcements
- save commands
- shutdown commands
- account creation commands handled by worldserver
Add these values to .env:
RA_HOST=127.0.0.1
RA_PORT=3443
RA_USERNAME=your-ra-account
RA_PASSWORD=your-ra-password
RA_TIMEOUT_SECONDS=10
After the RA values are saved in .env:
- Restart the bot
- Open the Telegram control panel with
/startor/menu - Open
๐ Remote Access - Use one of the built-in actions:
โน Server Info๐พ Save All๐ฃ Announce๐ Shutdown๐ Graceful Restart๐ค Account Creator
For actions that need extra input, the bot will ask you to reply in chat.
Examples:
๐ฃ Announce: send the announcement text in chat (no confirmation step โ broadcasts immediately)๐ Shutdown: send the shutdown delay in seconds, then confirm๐ Graceful Restart: send the delay in seconds (ordefault), then the announcement template (ordefault), then confirm
You can send cancel during an input step to stop the current action.
- Open the Telegram control panel
- Press
๐ค Account Creator - Press
โ Create Account - Send the new username in chat
- Send the new password in chat
- Confirm the action when the bot asks
The bot will call the worldserver account creation command through RA.
Note: your username and password messages remain in your Telegram chat history. Long-press them and delete after creation if you do not want them to persist.
RA is not used to start or stop Windows processes like mysqld.exe, authserver.exe, or worldserver.exe. Those actions stay in the local process-control layer.
Set AUTO_RESTART_ON_CRASH=true in .env to make the bot recover crashed services automatically. It accepts true/false (also 1/0, yes/no, on/off) and defaults to false.
When enabled, the bot restarts a down service and everything downstream of it, in dependency order. This includes a service that is already down when the bot starts โ it does not need to witness the crash:
| Down service | Restarted |
|---|---|
mysql |
MySQL, AuthServer, WorldServer |
auth |
AuthServer, WorldServer |
world |
WorldServer |
The crash alert changes to โ ๏ธ CRASH DETECTED โ trying to restart, then updates in place to โ
Auto-restart complete or a failure notice with the per-step log. The bot retries a service up to 3 times; after that it posts โ Auto-restart failed after 3 attempts โ manual action needed and stays quiet for that service until it is healthy again, so a permanently broken service cannot spam the chat. Manual โถ Start / ๐ Restart / ๐ฎ Open Status buttons remain on the message.
When AUTO_RESTART_ON_CRASH=false the original behaviour applies: one crash alert per service with manual recovery buttons and no automatic action.
- MySQL is launched through
Database\_Server\MySQL.batby default to match the existing repack tooling. - AuthServer and WorldServer are launched from the
Repackfolder because their config and data directories are relative. - Restarting MySQL also restarts dependent server processes in dependency order.
AUTO_RESTART_ON_CRASHrecovers a crashed service plus its downstream dependents; see Auto-restart on crash.- Unauthorized Telegram users are ignored unless their numeric ID appears in the whitelist.
- Remote console features require RA to be enabled in
Repack\worldserver.confby settingRa.Enable = 1in theCONSOLE AND REMOTE ACCESSsection.
This project is free and open-source, built and maintained in spare time. If it's saved you time setting up or running your server โ or you'd just like to see it keep growing โ a coffee is hugely appreciated and helps keep the WoW repack tools maintained and improving.
Every contribution also funds more free tools for the MoP / Cata repack community โ thank you! ๐
This project is licensed under the MIT License. See LICENSE.



