Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Updates a Discord message with the status of a Minecraft server

License

Notifications You must be signed in to change notification settings

jyooru/minecraft-server-discord-status

Repository files navigation

Minecraft Server Discord Status

ci License

Updates a Discord message with the status of a Minecraft server.

Usage

  1. 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.

  2. 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/.../...
  3. 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 enable Developer Mode under Advanced.

  4. 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/.../...

Extra Options

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

License

See LICENSE for details.

About

Updates a Discord message with the status of a Minecraft server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published