Lords Monitor
Lords Monitor keeps Lords Bot running: it restarts the bot after a crash or freeze, signs it in, restarts it on a schedule and can alert you on Discord.
Lords Monitor is a small watchdog that comes with Lords Bot. It starts the bot, restarts it if it crashes or freezes, can sign it in for you, and can send you a Discord message when something goes wrong. Use it whenever you leave the bot running without watching it, especially on a cloud server.
Start the Monitor
The Monitor is Monitor.exe in your Lords Bot install folder (by default %LocalAppData%\Lords Bot). There is no Start menu shortcut for it; open the folder and double-click Monitor.exe. Its window is titled Monitor.
When the Monitor starts and the bot isn’t running, it starts the bot. To have the Monitor start with Windows, turn on Run at Windows startup in its settings.
Get the bot to sign in and start accounts by itself
The Monitor restarts the bot program, but the bot still has to sign in and start your accounts. Set this up once:
- On the bot’s sign-in screen, tick Remember Me so your email and password are saved. The Monitor’s Auto-login presses Sign in with these saved details.
- Tick Auto Start on the sign-in screen (or Settings > Options > Auto Start Accounts in the main window).
- On the account grid, tick Auto-Start for every account that should start by itself.
- Leave Auto-login on in the Monitor’s settings (it is on by default).
You don’t need Auto Login on the sign-in screen; the Monitor presses Sign in for you.
The main window
The top of the window shows the bot’s state:
- Running, with how long it has been up and when its last heartbeat arrived.
- Not responding: the bot is running but has stopped sending heartbeats. The Monitor is about to restart it.
- Restarting in …s: the bot stopped and the Monitor is about to start it again.
- Stopped: the bot isn’t running.
Below that, Logged in shows whether the bot is signed in, and Restarts and Crashes count what the Monitor has done. When a scheduled restart is on, Next scheduled restart shows how long until the next one.
- Restart restarts the bot now. If the bot is stopped, the button says Start.
- Stop closes the bot and keeps it closed until you click Start.
The Activity log underneath lists everything the Monitor does.
Note: If you close the bot yourself while the Monitor is running, the Monitor treats it as an unexpected stop and starts it again (and sends a Discord alert, if set up). To keep the bot closed, click Stop in the Monitor, or close the Monitor first.
Settings
Click the gear icon at the top right to open the settings. Changes are saved straight away.
| Setting | What it does | Default |
|---|---|---|
| Supervise all bot installs | Watches every Lords Bot install on this PC from this one Monitor, instead of only the install it sits in. See Several Installs on One PC. | Off |
| Watched bot folders | Shown when Supervise all bot installs is on. Bots that are running are found by themselves; add a folder here so its bot is also started when it isn’t running. | Empty |
| Auto-restart on crash | Starts the bot again when it closes unexpectedly. | On |
| Auto-login | Signs the bot in using the details saved with Remember Me. If the bot still isn’t signed in after 90 seconds, the Monitor restarts it. | On |
| Scheduled restart | Restarts the bot regularly, which keeps long sessions fresh. The Monitor asks the bot to close properly, and only forces it closed if it hasn’t closed after 20 seconds. | On |
| Restart every (min) | Minutes between scheduled restarts. | 360 (6 hours) |
| Wait before restart (s) | Seconds to wait after the bot stops before starting it again. | 45 |
| Heartbeat timeout (s) | The bot sends a heartbeat every few seconds. If none arrives for this long, the Monitor treats the bot as frozen, closes it and starts it again. | 90 |
| Minimize to tray | Closing or minimising the Monitor hides it in the system tray instead of quitting. | Off |
| Run at Windows startup | Starts the Monitor when you sign in to Windows. | Off |
| Notify on restart | Shows a Windows notification when the Monitor restarts the bot after it stopped. | On |
| Discord webhook | Sends alerts to a Discord channel. See below. | Empty |
Note: With Minimize to tray off, closing the Monitor window quits the Monitor, and nothing watches the bot any more.
The tray icon
When Minimize to tray is on, the Monitor has an icon in the system tray. Click it to see a small panel with Logged in, Restarts and Crashes, plus Open Monitor and Quit.
Discord alerts
- In Discord, open the channel’s settings > Integrations > Webhooks, create a webhook and copy its URL.
- Paste the URL into Discord webhook in the Monitor’s settings.
- Click Send test. A test message should appear in the channel straight away.
The Monitor sends a message only when something goes wrong:
- the bot stopped unexpectedly (it crashed, or something else closed it);
- the bot froze and had to be closed;
- the bot couldn’t sign in within 90 seconds;
- the bot failed to start;
- a scheduled restart had to force the bot closed.
It does not send messages for normal scheduled restarts, for your own Restart and Stop clicks, or for settings changes. If several things happen at once, for example after a PC restart, they arrive as one message. Each message names the install folder it is about.
The text under the webhook box tells you if the URL isn’t a Discord webhook, or if Discord rejects it (for example because the webhook was deleted). Alerts are paused until you fix the URL. If your internet or Discord is down, alerts wait and are sent when the connection is back.
Things to avoid
- Don’t run the Monitor as a Windows service or as a scheduled task set to “Run whether user is logged on or not”. The bot it starts then has no window you can see or open. Use Run at Windows startup.
- Run the Monitor and the bot as the same Windows user. A Monitor can’t see a bot running under another Windows user, so it starts a second copy of the same install.
Updates
When Lords Bot updates, the updater closes the bot and the Monitor, replaces the files, and then starts the Monitor again if it was running. The Monitor then starts the bot. See Updates and the Beta Channel.
Still stuck? Ask our staff on Discord.