In a Discord embed, shows the status of a Minecraft server.
/link
Link your Minecraft Server to your Discord Guild. The status message will be shown in the same channel where you have sent the command. You can choose a separate channel for server IP.
/unlink
Stop receiving updates about the Minecraft Server. You can choose to delete the status messages.
server_address
: Required. The address (or IP address) of your Minecraft server. Add port number if not default. Format:IP.ADDRESS:PORT
orsub.domain.ext:port
ordomain.ext:port
.change_channel_name
: Optional. Default:False
. Change the name of the channel where the status message is sent. Default names are 🟩-online and 🟥-offline.channel_name_online
: Optional. Default:🟩-online
. Name of the status channel when the server is online.channel_name_offline
: Optional. Default:🟥-offline
. Name of the status channel when the server is offline.show_player_list
: Optional. Default:True
. Show a list of all the connected players in the status message.show_ip
: Optional. Default:True
. Show server IP in the status message. You can hide the IP and show it in a different channel. Useful if your server is invite-only, but you still want other members to see its status and active players.ip_update_channel
: Optional. Channel where the IP address will be sent. Use channel ID (right click on channel > Copy Channel ID if Developer Mode is active).default_server_name
: Optional. Title for the status message.use_motd_as_default_server_name
: Optional. Default:False
. Use MOTD as title instead of server name.
Notes
- You need
Administrator
permission in order to use this bot in your server. - Only one Minecraft Server can be linked to a Discord Guild. Using
/link
again will overwrite whatever settings you have previously applied. - The bot has been made to minimize interactions and messages. By design, it will not message you if something is wrong (can't send message, can't reach the Minecraft Server, if you don't have the required permissions, etc.). If the status message is not updating, please make sure you have correctly used the
/link
command. Try again if you are unsure. - In case something is going wrong, have found a bug or have you a suggestion to make, you might contact me on Discord (
@Jahus
) or Telegram. - If the bot is useful, consider making a donation on Patreon.
Prepare a channel for people to check your Minecraft Server status. Make it so only the bot can send messages there. Once the first status message is sent, the bot will update it every 5 minutes. Please, don't try to change the update time to less than 60 seconds; the API won't update its cache that fast.
Want to self-host the bot? Create a Discord Bot on the Discord Developer Dashboard. Once done, get your token and set it in the config.json
file.
In a config.json
file, store the following settings:
{
"discord_bot_token": "sicret.token.w-o-w",
"sleep_time": 300
}
discord_bot_token
: A token you'll get from Discord;sleep_time
: Time between server status updates. Keep it above 60 s.
To run the bot at your server's startup, register the .service
file with systemctl
and enable it.
This bot uses the Minecraft Server Status API, that's completely free. If you appreciate their work, consider donating to them on PayPal.
Feel free to build upon the actual code.