From 1367a9090423a3e3a16ef2d0cc618e2d798627cf Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sun, 19 Feb 2023 21:44:58 -0500 Subject: [PATCH] Start collector when the command is run --- slash-commands/notifications.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slash-commands/notifications.js b/slash-commands/notifications.js index 313c35e..cd45dbc 100755 --- a/slash-commands/notifications.js +++ b/slash-commands/notifications.js @@ -84,6 +84,7 @@ module.exports = { if (fruitMessage != "") replyParts.push(`Fruit Message: ${fruitMessage}`); await interaction.editReply(replyParts.join("\n")).catch(e => console.error(e)); fn.collectionBuilders.guildInfos(interaction.client); + fn.setupCollector(interaction.channel, guildInfo); } else { const watchChannel = interaction.options.getChannel('watchchannel'); const waterMessage = interaction.options.getString('watermessage'); @@ -101,6 +102,7 @@ module.exports = { if (fruitMessage != "") replyParts.push(`Fruit Message: ${fruitMessage}`); await interaction.editReply(replyParts.join("\n")).catch(e => console.error(e)); fn.collectionBuilders.guildInfos(interaction.client); + fn.setupCollector(watchChannel, guildInfo); } break; case "update": @@ -126,6 +128,7 @@ module.exports = { if (outFruitMessage != "") replyParts.push(`Fruit Message: ${outFruitMessage}`); await interaction.editReply(replyParts.join("\n")).catch(e => console.error(e)); fn.collectionBuilders.guildInfos(interaction.client); + fn.setupCollector(inWatchChannel, guildInfo); } else { await interaction.editReply(fn.builders.errorEmbed("There is no existing notification relay to update!")).catch(e => console.error(e)); }