From e0db36b46bccd6a59fbef917e32a47a912760d69 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 12:04:19 -0500 Subject: [PATCH] Declare filter before used in collector --- bot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bot.js b/bot.js index 1d94850..312ca10 100644 --- a/bot.js +++ b/bot.js @@ -43,6 +43,10 @@ client.on("ready", () => { }); client.on("message", async message => { + const filter = reaction => { + return reaction.emoji.name === '😎'; + }; + const collector = message.createReactionCollector(filter); collector.on('collect', (reaction, user) => { @@ -115,10 +119,6 @@ client.on("message", async message => { } else if (message.content.toLowerCase().startsWith(`${prefix}aboutbot`)) { aboutBot(message); } - - const filter = reaction => { - return reaction.emoji.name === '😎'; - }; }); async function aboutBot(message) {