From e3ed133830b6ac019c89d27a88414721a7dd2375 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sun, 12 Feb 2023 10:25:32 -0500 Subject: [PATCH] Update to read contents of embeds --- modules/functions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/functions.js b/modules/functions.js index 0c7dc1e..7c0b95d 100644 --- a/modules/functions.js +++ b/modules/functions.js @@ -534,7 +534,8 @@ const functions = { const filter = message => message.author.id != process.env.BOTID; const collector = channel.createMessageCollector({ filter }); collector.on('collect', message => { - if (message.content.includes(strings.notifications.water)) { + if (message.embeds.length == 0) return; + if (message.embeds[0].data.description(strings.notifications.water)) { this.sendReminder(guildInfo, guildInfo.waterMessage, guildInfo.reminderChannelId, guild); } else if (message.content.includes(strings.notifications.fruit)) { this.sendReminder(guildInfo, guildInfo.fruitMessage, guildInfo.reminderChannelId, guild);