Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicnessTwo committed Oct 6, 2023
1 parent 7da97f8 commit 9b16a7d
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion run.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,38 @@ function logOutage() {
function sendDiscordNotification(start, end) {
const durationMinutes = (end - start) / (1000 * 60);
return axios.post(DISCORD_WEBHOOK_URL, {
content: `🚫 ${LOCATION} Internet Outage 🚫\nStarted: ${start.toISOString()}\nEnded: ${end.toISOString()}\nDuration: ${durationMinutes.toFixed(2)} minutes`
"content": null,
"embeds": [
{
"title": `${LOCATION} Internet Outage`,
"color": 16726072,
"fields": [
{
"name": "Outage Start",
"value": `${start.toISOString()}`,
"inline": true
},
{
"name": "Outage Ended",
"value": `${end.toISOString()}`,
"inline": true
},
{
"name": "Duration",
"value": `${durationMinutes.toFixed(2)} minutes`
}
],
"author": {
"name": "DualPing Alert",
"url": "https://github.com/EpicnessTwo/DualPing"
},
"footer": {
"text": "Powered by DualPing | https://github.com/EpicnessTwo/DualPing"
}
}
],
"username": "DualPing Alerts",
"attachments": []
});
}

Expand Down

0 comments on commit 9b16a7d

Please sign in to comment.