Updates a Discord message with the status of a Minecraft server.
-
Create a new Discord webhook. You can do so by going to the channel you would like to use, pressing
Edit Channel->Integrations->Webhooks->New Webhook->Copy Webhook URL. -
Create a new Discord message using the webhook:
curl -H "Accept: application/json" \ -H "Content-Type:application/json" \ -X POST \ --data "{\"content\": \"temporary\"}" \ https://discord.com/api/webhooks/.../...
-
Obtain the message ID. You can do so by hovering over the message, pressing
...->Copy ID. If the option isn't there, you will need to go to your user settings, and enableDeveloper ModeunderAdvanced. -
Run the service...
-
using your terminal:
msds --message-id 1234 --server-host example.com --webhook https://discord.com/api/webhooks/.../...
-
using Docker:
docker build . -t msds docker run --rm -it msds --message-id 1234 --server-host example.com --webhook https://discord.com/api/webhooks/.../... -
using Docker Compose:
version: "3" services: status: build: . environment: - MESSAGE_ID=1234 - SERVER_HOST=example.com - WEBHOOK=https://discord.com/api/webhooks/.../...
-
| Argument | Environment Variable | Description |
|---|---|---|
| --message-id | MESSAGE_ID | ID of the Discord message to edit |
| --server-host | SERVER_HOST | Host of the Minecraft server to check |
| --server-port | SERVER_PORT | Port of the Minecraft server to check |
| --sleep | SLEEP | Seconds to sleep between updates |
| --thumbnail | THUMBNAIL | URL of the thumbnail to use in the Discord embed |
| --title | TITLE | Title of the Discord embed |
| --webhook | WEBHOOK | URL Of the Discord webhook |
See LICENSE for details.