Simple Discord bot that posts and auto-updates Minecraft Java server (in the future maybe other games) status embeds. Uses mcstatus to query servers and stores autostatus configuration (channel, server IP, display name, message id) in a JSON file so updates survive restarts.
This bot was made for GreatNet Hosting and they are hosting a public instance of this bot. You can invite it to your server with this link.
GreatNet Hosting was kind enough to provide this bot publically. Consider supporting the project by using their services and code SSB25 for 30% off your first month of bot hosting or a game server!
/status <ip> [name]— show a one-time server status embed only for that user./autostatus <name> <ip>— create an auto-updating status message in the current channel (requires Manage Channels).- Periodic updates every 5 minutes. Config persisted to
server_status_config.json.
- Python 3.10+
- See
requirements.txt:- nextcord 3.1.1
- python-dotenv 1.1.1
- mcstatus 12.0.6
- PyYAML 6.0.3
-
Clone the repository:
git clone https://github.com/sennecoolgames/serverstatusbot.git cd serverstatusbot -
Install the requirements
pip install -r requirements.txt
-
Copy
.env.exampleto.envand set:cp .env.example .env
DISCORD_TOKEN— your bot token (create one here)TEST_SERVER_ID— (optional) a guild ID used during development to register slash commands to a single server. Only needed for local testing; remove or leave empty for global commands.
-
Run the bot:
# Windows C:/Python312/python.exe main.py
# Linux python3 main.py
- Invite the bot to your server with appropriate permissions (Send Messages, Embed Links, Manage Messages if you want to allow message deletion).
- Use
/status <server_ip> [name]to check status immediately. - Use
/autostatus <name> <server_ip>in a channel where you want the auto-updating embed. You must have Manage Channels permission to use the command. - The bot will create a message and update it every 5 minutes.
- If you see errors about editing messages authored by another user, ensure the saved
message_idinserver_status_config.jsonbelongs to a message the bot created. Delete that entry to recreate the message. TEST_SERVER_IDis only for development (registers new slash commands to a single guild). Leave blank or remove for production/global commands.
main.py— bot entrypoint (loads cogs).server_status_config.json— stored autostatus configs (channel, ip, name, message_id).config.yml— additional configs like keywords to filter from version strings.cogs/status.py— manual status command, embed formatting.cogs/autostatus.py— auto-updating cog, persistence and background task.
If you want adjustments to embed styling, update create_embed in cogs/status.py and cogs/autostatus.py.
