Update to read contents of embeds
This commit is contained in:
parent
33ee3e9c4f
commit
e3ed133830
@ -534,7 +534,8 @@ const functions = {
|
|||||||
const filter = message => message.author.id != process.env.BOTID;
|
const filter = message => message.author.id != process.env.BOTID;
|
||||||
const collector = channel.createMessageCollector({ filter });
|
const collector = channel.createMessageCollector({ filter });
|
||||||
collector.on('collect', message => {
|
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);
|
this.sendReminder(guildInfo, guildInfo.waterMessage, guildInfo.reminderChannelId, guild);
|
||||||
} else if (message.content.includes(strings.notifications.fruit)) {
|
} else if (message.content.includes(strings.notifications.fruit)) {
|
||||||
this.sendReminder(guildInfo, guildInfo.fruitMessage, guildInfo.reminderChannelId, guild);
|
this.sendReminder(guildInfo, guildInfo.fruitMessage, guildInfo.reminderChannelId, guild);
|
||||||
|
Loading…
Reference in New Issue
Block a user