From 5319acdec63da6f1ae5455f5f96ec9a47991f5ba Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sat, 1 Jan 2022 23:32:01 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=20=D1=83=D1=87=D0=B8=D1=82=D1=8B?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D1=81=20=D0=BF=D1=80=D0=B5=D1=84=D0=B8?= =?UTF-8?q?=D0=BA=D1=81=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Fun/findwords.js | 11 +++-------- commands/Fun/number.js | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index 5f3b54f3..0e18a788 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -65,16 +65,11 @@ class FindWords extends Command { }); collector.on("collect", (msg) => { - if (!participants.includes(msg.author.id)) { - participants.push(msg.author.id); - }; + if (this.client.functions.getPrefix(msg, data)) return; + if (!participants.includes(msg.author.id)) participants.push(msg.author.id); if (msg.content.toLowerCase().indexOf(word) >= 0 && wordList.map((word) => word.toLowerCase()).indexOf(msg.content.toLowerCase()) >= 0) { collector.stop(msg.author.id); // Stop the collector - } else { - msg.error("fun/findwords:INVALID_WORD", { - member: msg.author.toString() - }); - }; + } else msg.error("fun/findwords:INVALID_WORD", { member: msg.author.toString() }); }); collector.on("end", async (collected, reason) => { diff --git a/commands/Fun/number.js b/commands/Fun/number.js index 220a8263..2dd48ba5 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -36,8 +36,8 @@ class Number extends Command { currentGames[message.guild.id] = true; collector.on("collect", async msg => { + if (this.client.functions.getPrefix(msg, data)) return; if (!participants.includes(msg.author.id)) participants.push(msg.author.id); - if (isNaN(msg.content)) return; const parsedNumber = parseInt(msg.content, 10);