From 60a7a4f9496b783bee0a553b59f1cae76ff459ce Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Tue, 28 Mar 2023 10:35:46 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20clear=20=D0=B1=D0=B5?= =?UTF-8?q?=D0=B7=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Moderation/clear.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index 97d1d0c4..59ddae7a 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -117,8 +117,8 @@ class Clear extends BaseCommand { limit: option, }); - if ((!member && !user_id) || (member && user_id)) return interaction.replyT("moderation/clear:REQUIRE_ID_USER", null, { edit: true }); - if (member || user_id) messages = messages.filter(m => m.author.id === (member?.id || user_id)); + if (user_id && member) return interaction.replyT("moderation/clear:REQUIRE_ID_USER", null, { edit: true }); + if (user_id || member) messages = messages.filter(m => m.author.id === (user_id || member.id)); interaction.channel.bulkDelete(messages.filter(m => !m.pinned), true);