mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
Мелкие правки
Переименовать файл команды clearwarns Зачем добавлять если потом убавлять?
This commit is contained in:
parent
5d6a74e637
commit
d8fb0135cf
3 changed files with 5 additions and 6 deletions
|
@ -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");
|
if (!amount || isNaN(amount) || parseInt(amount) < 1) return message.error("moderation/clear:MISSING_AMOUNT");
|
||||||
|
|
||||||
await message.delete();
|
await message.delete();
|
||||||
|
@ -49,7 +49,6 @@ class Clear extends Command {
|
||||||
if (messages.length > amount) messages.length = parseInt(amount, 10);
|
if (messages.length > amount) messages.length = parseInt(amount, 10);
|
||||||
|
|
||||||
messages = messages.filter((m) => !m.pinned);
|
messages = messages.filter((m) => !m.pinned);
|
||||||
amount++;
|
|
||||||
|
|
||||||
message.channel.bulkDelete(messages, true);
|
message.channel.bulkDelete(messages, true);
|
||||||
|
|
||||||
|
@ -57,12 +56,12 @@ class Clear extends Command {
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
toDelete = await message.success("moderation/clear:CLEARED_MEMBER", {
|
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
|
username: user.tag
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
toDelete = await message.success("moderation/clear:CLEARED", {
|
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"))}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"DESCRIPTION": "Clear a member sanctions!",
|
"DESCRIPTION": "Clear a member sanctions!",
|
||||||
"USAGE": "{{prefix}}clear-sanctions [@member]",
|
"USAGE": "{{prefix}}clearwarns [@member]",
|
||||||
"EXAMPLES": "{{prefix}}clear-sanctions @Jonny_Bro#4226",
|
"EXAMPLES": "{{prefix}}clearwarns @Jonny_Bro#4226",
|
||||||
"MISSING_MEMBER": "Please mention the member you wish to remove the sanctions from!",
|
"MISSING_MEMBER": "Please mention the member you wish to remove the sanctions from!",
|
||||||
"SUCCESS": "**{{username}}**'s sanctions were deleted!"
|
"SUCCESS": "**{{username}}**'s sanctions were deleted!"
|
||||||
}
|
}
|
Loading…
Reference in a new issue