Custom embed username
This commit is contained in:
		
							parent
							
								
									91fce75a93
								
							
						
					
					
						commit
						ebf207c2f5
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -87,7 +87,7 @@ class Notification { | ||||||
|                 // If heartbeatJSON is null, assume we're testing.
 |                 // If heartbeatJSON is null, assume we're testing.
 | ||||||
|                 if (heartbeatJSON == null) { |                 if (heartbeatJSON == null) { | ||||||
|                     let discordtestdata = { |                     let discordtestdata = { | ||||||
|                         username: "Uptime Kuma", |                         username: notification.discordUsername || "Uptime Kuma", | ||||||
|                         content: msg, |                         content: msg, | ||||||
|                     } |                     } | ||||||
|                     await axios.post(notification.discordWebhookUrl, discordtestdata) |                     await axios.post(notification.discordWebhookUrl, discordtestdata) | ||||||
|  | @ -96,7 +96,7 @@ class Notification { | ||||||
|                 // If heartbeatJSON is not null, we go into the normal alerting loop.
 |                 // If heartbeatJSON is not null, we go into the normal alerting loop.
 | ||||||
|                 if (heartbeatJSON["status"] == 0) { |                 if (heartbeatJSON["status"] == 0) { | ||||||
|                     let discorddowndata = { |                     let discorddowndata = { | ||||||
|                     username: "Uptime Kuma", |                     username: notification.discordUsername || "Uptime Kuma", | ||||||
|                     embeds: [{ |                     embeds: [{ | ||||||
|                         title: "❌ One of your services went down. ❌", |                         title: "❌ One of your services went down. ❌", | ||||||
|                         color: 16711680, |                         color: 16711680, | ||||||
|  | @ -126,7 +126,7 @@ class Notification { | ||||||
|                      |                      | ||||||
|                 } else if (heartbeatJSON["status"] == 1) { |                 } else if (heartbeatJSON["status"] == 1) { | ||||||
|                     let discordupdata = { |                     let discordupdata = { | ||||||
|                     username: "Uptime Kuma", |                     username: notification.discordUsername || "Uptime Kuma", | ||||||
|                     embeds: [{ |                     embeds: [{ | ||||||
|                         title: "✅ Your service " +  monitorJSON["name"] + " is up! ✅", |                         title: "✅ Your service " +  monitorJSON["name"] + " is up! ✅", | ||||||
|                         color: 65280, |                         color: 65280, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue