From 744b4e1f016a0d14bd8eff6dc294ce726fc6ae20 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Tue, 15 Feb 2022 01:34:39 +0500 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Moderation/poll.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index 4db25b61..5c919205 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -34,14 +34,14 @@ class Poll extends Command { if (tmsg.content.toLowerCase() === message.translate("common:NO").toLowerCase()) { tmsg.delete(); msg.delete(); - message.delete(); collector.stop(true); + + message.delete(); } if (tmsg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) { tmsg.delete(); msg.delete(); - message.delete(); const tmsg1 = await message.sendT("moderation/announcement:MENTION_TYPE_PROMPT"); const filter = m => m.author.id === message.author.id; @@ -65,12 +65,12 @@ class Poll extends Command { c.stop(true); } }); + c.on("end", (collected, reason) => { - if (reason === "time") { - message.delete(); - return message.error("misc:TIMES_UP"); - } + if (reason === "time") return message.error("misc:TIMES_UP"); }); + + message.delete(); } });