mbround18 / valheim-docker

Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.
https://hub.docker.com/r/mbround18/valheim
BSD 3-Clause "New" or "Revised" License
757 stars 81 forks source link

Getting two Stop messages for server in Discord using webhook and auto restart scheduler #769

Closed auk5 closed 7 months ago

auk5 commented 7 months ago

Hi there, this is a minor nit-picky issue, but a confusing one. I get two Stop messages when using the built in Schedule restart environmental variable. They all appear at the same time according to discord (05:00). See posts below for more info.

Not a big problem but just curious as to why it's doing it more than anything. Thanks!

Discord Image image

Docker Compose version: "3.1" services:

Valheim

valheim: image: mbround18/valheim:latest container_name: Valheim stop_signal: SIGINT ports:

Discord.JSON { "events": { "update": { "content": "🆕: REDACTED has been updated", "embeds": [ ] }, "stop": { "content": "🟥 Halted", "embeds": [ ] }, "broadcast": { "content": "Broadcast message: {{server_name}}", "embeds": [ ] }, "start": { "content": "🟢 Started: {{server_name}}", "embeds": [ ] } } }

auk5 commented 7 months ago

Hi, I figured this one out. It was because I deleted the stuff in "embeds" which was the {{description}} message. Which breaks down into more detail what the stop message is about. New code is below which now keeps the messages compact but more descriptive.

image

Discord.json

{
  "events": {
    "update": {
      "content": "🆕: BroWorld has been updated",
      "embeds": [
      ]
    },
    "stop": {
      "content": "🟥 {{description}}",
      "embeds": [
      ]
    },
    "broadcast": {
      "content": "Broadcast message: {{server_name}}",
      "embeds": [
      ]
    },
    "start": {
      "content": "🟢 Started: {{server_name}}",
      "embeds": [
      ]
    }
  }
}