Update to add includes check

This commit is contained in:
Skylar Grant 2023-02-12 11:08:14 -05:00 committed by GitHub
parent 077bb6c1b2
commit 1a9d14e3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -537,9 +537,9 @@ const functions = {
const collector = channel.createMessageCollector({ filter }); const collector = channel.createMessageCollector({ filter });
collector.on('collect', message => { collector.on('collect', message => {
if (message.embeds.length == 0) return; if (message.embeds.length == 0) return;
if (message.embeds[0].data.description(strings.notifications.water)) { if (message.embeds[0].data.description.includes(strings.notifications.water)) {
this.sendReminder(guildInfo, guildInfo.waterMessage, guildInfo.reminderChannelId, guild); this.sendReminder(guildInfo, guildInfo.waterMessage, guildInfo.reminderChannelId, guild);
} else if (message.content.includes(strings.notifications.fruit)) { } else if (message.embeds[0].data.descriprion.includes(strings.notifications.fruit)) {
this.sendReminder(guildInfo, guildInfo.fruitMessage, guildInfo.reminderChannelId, guild); this.sendReminder(guildInfo, guildInfo.fruitMessage, guildInfo.reminderChannelId, guild);
} }
}); });