motd-checker is a lightweight Node.js application that monitors the Message of the Day (MOTD) of Minecraft servers registered through BungeeCord. It automatically checks for updates and can trigger notifications or database updates when the MOTD changes. It integrates with the BungeeServerManager plugin to dynamically update server availability in BungeeCord.
- Detects changes in the MOTD of Minecraft servers
- Integrates with BungeeServerManager to propagate updates
- Uses an SQL database to store server availability
- Configurable polling interval and target servers
- Optional Discord notifications (enabled with
--discordflag) - Web API for status checking
- Keeps a snapshot of the previous MOTD for accurate comparisons
- Detect MOTD changes to enable/disable servers on BungeeCord
- Detect outages in infrastructure and prevent access to disabled servers, reducing user confusion
- Node.js
- MySQL database
- BungeeCord with BungeeServerManager plugin
-
Clone the repository:
git clone https://github.com/Macaron27/motd-checker.git cd motd-checker -
Install dependencies:
npm install
-
Set up your environment variables in a
.envfile:# Database DB_HOST=your_db_host DB_USER=your_db_user DB_PASSWORD=your_db_password DB_NAME=your_db_name # Optional: Web server ENABLE_WEB=1 PORT=3000 # Optional: Refresh interval (ms) REFRESH_INTERVAL=15000 # Optional: Minecraft timeout (ms) MINECRAFT_TIMEOUT=10000 # Optional: Discord notifications DISCORD_BOT_TOKEN=your_bot_token DISCORD_GUILD_ID=your_guild_id DISCORD_CHANNEL_ID=your_channel_id
Run the checker:
node server.jsTo enable Discord notifications:
node server.js --discordThe application will start monitoring the servers and update the database accordingly. If Discord is enabled, it will send notifications on status changes.
If the web server is enabled, you can access the following endpoints:
GET /api/health- Health check endpointGET /api/servers- Returns the current status of all monitored serversGET /api/servers/:name- Returns the status of a specific server by namePOST /api/check- Manually triggers a status check and returns the resultsGET /api/status- Legacy endpoint, same as/api/servers
The web interface is available at http://localhost:3000 (or configured port).
- Support for additional notification channels (Slack, email, etc.)
- Docker container for easier deployment
- Enhanced REST API endpoints
This project is open source and available under the GNU GPLv3 License.