From d8fb0135cfa64edf91baf521dfdf23e047c6338f Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Fri, 28 Jan 2022 00:45:21 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=9F=D0=B5=D1=80=D0=B5=D0=B8?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D1=8B=20cle?= =?UTF-8?q?arwarns=20=D0=97=D0=B0=D1=87=D0=B5=D0=BC=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D1=8F=D1=82=D1=8C=20=D0=B5=D1=81=D0=BB=D0=B8?= =?UTF-8?q?=20=D0=BF=D0=BE=D1=82=D0=BE=D0=BC=20=D1=83=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D1=8F=D1=82=D1=8C=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Moderation/clear.js | 7 +++---- commands/Moderation/{clearsanctions.js => clearwarns.js} | 0 .../moderation/{clearsanctions.json => clearwarns.json} | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) rename commands/Moderation/{clearsanctions.js => clearwarns.js} (100%) rename languages/en-US/moderation/{clearsanctions.json => clearwarns.json} (64%) diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index b4fab619..738955b3 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -35,7 +35,7 @@ class Clear extends Command { }); } - let amount = args[0]; + const amount = args[0]; if (!amount || isNaN(amount) || parseInt(amount) < 1) return message.error("moderation/clear:MISSING_AMOUNT"); await message.delete(); @@ -49,7 +49,6 @@ class Clear extends Command { if (messages.length > amount) messages.length = parseInt(amount, 10); messages = messages.filter((m) => !m.pinned); - amount++; message.channel.bulkDelete(messages, true); @@ -57,12 +56,12 @@ class Clear extends Command { if (user) { toDelete = await message.success("moderation/clear:CLEARED_MEMBER", { - amount: `${--amount} ${message.getNoun(--amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}`, + amount: `${amount} ${message.getNoun(amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}`, username: user.tag }); } else { toDelete = await message.success("moderation/clear:CLEARED", { - amount: `${--amount} ${message.getNoun(--amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}` + amount: `${amount} ${message.getNoun(amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}` }); } diff --git a/commands/Moderation/clearsanctions.js b/commands/Moderation/clearwarns.js similarity index 100% rename from commands/Moderation/clearsanctions.js rename to commands/Moderation/clearwarns.js diff --git a/languages/en-US/moderation/clearsanctions.json b/languages/en-US/moderation/clearwarns.json similarity index 64% rename from languages/en-US/moderation/clearsanctions.json rename to languages/en-US/moderation/clearwarns.json index 820e6a92..233cc644 100644 --- a/languages/en-US/moderation/clearsanctions.json +++ b/languages/en-US/moderation/clearwarns.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Clear a member sanctions!", - "USAGE": "{{prefix}}clear-sanctions [@member]", - "EXAMPLES": "{{prefix}}clear-sanctions @Jonny_Bro#4226", + "USAGE": "{{prefix}}clearwarns [@member]", + "EXAMPLES": "{{prefix}}clearwarns @Jonny_Bro#4226", "MISSING_MEMBER": "Please mention the member you wish to remove the sanctions from!", "SUCCESS": "**{{username}}**'s sanctions were deleted!" } \ No newline at end of file