Update to read contents of embeds

This commit is contained in:
Skylar Grant 2023-02-12 10:25:32 -05:00 committed by GitHub
parent 33ee3e9c4f
commit e3ed133830
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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);