From a8e89a68ac349c716f5b55a74e90f59d069e6262 Mon Sep 17 00:00:00 2001 From: Mentor Date: Wed, 27 Jul 2022 14:21:36 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20context=20dependent=20discord=20web?= =?UTF-8?q?hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/integrations/changingroom.js | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/integrations/changingroom.js b/functions/integrations/changingroom.js index c919f0f..7572b71 100644 --- a/functions/integrations/changingroom.js +++ b/functions/integrations/changingroom.js @@ -330,6 +330,7 @@ exports.notify_holders_of_changing_room_updates = async context => { console.log( `Sent ${ owners_to_email.length } emails for ${ network } outfits` ) // Notify Discord too + if( !owners_to_email.length ) return console.log( `Zero people to email, not sending Discord webhook` ) await notify_discord_of_outfit_notifications( owners_to_email.length, has_outfit_available.length )