From 3b01badd8f6c754ad0d0baf5296a2e08ab84d662 Mon Sep 17 00:00:00 2001 From: mrrfv Date: Wed, 8 Nov 2023 22:44:19 +0100 Subject: [PATCH] Fix webhook validity checking logic --- lib/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers.js b/lib/helpers.js index 89116260..51e8d581 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -59,7 +59,7 @@ export async function notifyWebhook(msg) { // Check if the webhook URL exists const webhook_url = process.env.DISCORD_WEBHOOK_URL; - if (webhook_url || !webhook_url.startsWith('http')) { + if (webhook_url && webhook_url.startsWith('http')) { // Send the message to the webhook await sendMessageToWebhook(webhook_url, `CGPS: ${msg}`); }