Add avatar_url to discord messages

This commit is contained in:
Derek Antrican 2025-06-04 17:56:23 -07:00 committed by GitHub
parent 8d710e217a
commit a5ee6cd62c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,6 +37,7 @@ class Discord extends NotificationProvider {
if (heartbeatJSON["status"] === DOWN) { if (heartbeatJSON["status"] === DOWN) {
let discorddowndata = { let discorddowndata = {
username: discordDisplayName, username: discordDisplayName,
avatar_url: "https://github.com/louislam/uptime-kuma/raw/master/public/icon.png",
embeds: [{ embeds: [{
title: "❌ Your service " + monitorJSON["name"] + " went down. ❌", title: "❌ Your service " + monitorJSON["name"] + " went down. ❌",
color: 16711680, color: 16711680,
@ -74,6 +75,7 @@ class Discord extends NotificationProvider {
} else if (heartbeatJSON["status"] === UP) { } else if (heartbeatJSON["status"] === UP) {
let discordupdata = { let discordupdata = {
username: discordDisplayName, username: discordDisplayName,
avatar_url: "https://github.com/louislam/uptime-kuma/raw/master/public/icon.png",
embeds: [{ embeds: [{
title: "✅ Your service " + monitorJSON["name"] + " is up! ✅", title: "✅ Your service " + monitorJSON["name"] + " is up! ✅",
color: 65280, color: 65280,