diff --git a/package.json b/package.json index 4814da6a7a..2a04be2407 100644 --- a/package.json +++ b/package.json @@ -78,8 +78,8 @@ "@louislam/ping": "~0.4.4-mod.1", "@louislam/sqlite3": "15.1.6", "args-parser": "~1.3.0", - "axios": "~0.27.0", - "axios-ntlm": "1.3.0", + "axios": "~1.6.4", + "axios-ntlm": "1.3.1", "badge-maker": "~3.3.1", "bcryptjs": "~2.4.3", "cacheable-lookup": "~6.0.4", diff --git a/server/notification-providers/discord.js b/server/notification-providers/discord.js index f24cd6169c..beaa1548c2 100644 --- a/server/notification-providers/discord.js +++ b/server/notification-providers/discord.js @@ -6,9 +6,6 @@ class Discord extends NotificationProvider { name = "discord"; - /** - * @inheritdoc - */ async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { let okMsg = "Sent Successfully."; @@ -33,7 +30,6 @@ class Discord extends NotificationProvider { break; case "port": case "dns": - case "gamedig": case "steam": address = monitorJSON["hostname"]; if (monitorJSON["port"]) { @@ -50,24 +46,24 @@ class Discord extends NotificationProvider { let discorddowndata = { username: discordDisplayName, embeds: [{ - title: "❌ Your service " + monitorJSON["name"] + " went down. ❌", + title: "❌ Der Dienst " + monitorJSON["name"] + " ist Offline. ❌", color: 16711680, timestamp: heartbeatJSON["time"], fields: [ { - name: "Service Name", + name: "Dienstname", value: monitorJSON["name"], }, { - name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL", + name: monitorJSON["type"] === "push" ? "Service Type" : "Dienstadresse", value: monitorJSON["type"] === "push" ? "Heartbeat" : address, }, { - name: `Time (${heartbeatJSON["timezone"]})`, - value: heartbeatJSON["localDateTime"], + name: "Datum und Uhrzeit (UTC)", + value: heartbeatJSON["time"], }, { - name: "Error", + name: "Fehler", value: heartbeatJSON["msg"] == null ? "N/A" : heartbeatJSON["msg"], }, ], @@ -85,21 +81,21 @@ class Discord extends NotificationProvider { let discordupdata = { username: discordDisplayName, embeds: [{ - title: "✅ Your service " + monitorJSON["name"] + " is up! ✅", + title: "✅ Der Dienst " + monitorJSON["name"] + " ist Online! ✅", color: 65280, timestamp: heartbeatJSON["time"], fields: [ { - name: "Service Name", + name: "Dienstname", value: monitorJSON["name"], }, { - name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL", + name: monitorJSON["type"] === "push" ? "Service Type" : "Dienstadresse", value: monitorJSON["type"] === "push" ? "Heartbeat" : address, }, { - name: `Time (${heartbeatJSON["timezone"]})`, - value: heartbeatJSON["localDateTime"], + name: "Datum und Uhrzeit (UTC)", + value: heartbeatJSON["time"], }, { name: "Ping",