diff --git a/cmds/moderation/ban.js b/cmds/moderation/ban.js index 6587f65..19d6f56 100644 --- a/cmds/moderation/ban.js +++ b/cmds/moderation/ban.js @@ -45,7 +45,8 @@ module.exports = class ban extends commando.Command { if (ARG === "--" || ARG.trim().length < 1) continue; if (ARG.startsWith("d ")) { const U = ARG.slice(2).trim(); - if (U.length && !/\D/.test(U)) daysToDeleteMessages = parseInt(U, 10); else return trySend(msg.client, msg, "Invalid number of days to delete messages!"); + if (U.length && !/\D/.test(U)) daysToDeleteMessages = parseInt(U, 10); else return trySend(msg.client, + msg, "Invalid number of days to delete messages!"); continue; } else if (CHECK_FOR_DURATION_REGEXP.test(ARG.trim())) @@ -93,7 +94,8 @@ module.exports = class ban extends commando.Command { bannedStr = bannedStr.slice(0, -2); if (bannedArr.length) bannedStr += ` and ${bannedArr.length} more...`; - if (already.length) emb.addField("Already banned", "<@" + already.join(">, <@") + ">\n\nDuration updated for these users"); + if (already.length) emb.addField("Already banned", "<@" + already.join(">, <@") + + ">\n\nDuration updated for these users"); emb.addField("Banned", bannedStr || "`[NONE]`") .addField("At", defaultDateFormat(pDuration.invoked), true) @@ -101,7 +103,8 @@ module.exports = class ban extends commando.Command { } emb.addField("For", pDuration.duration?.strings.join(" ") || "Indefinite"); - if (cant.length) emb.addField("Can't ban", "<@" + cant.join(">, <@") + ">\n\n**You can't ban someone with higher position than you <:nekokekLife:852865942530949160>**") + if (cant.length) emb.addField("Can't ban", "<@" + cant.join(">, <@") + + ">\n\n**You can't ban someone with the same or higher position than you <:nekokekLife:852865942530949160>**"); return trySend(msg.client, msg, { content: resultMsg, embed: emb }); } diff --git a/cmds/moderation/mute.js b/cmds/moderation/mute.js index 5f2c38c..644219f 100644 --- a/cmds/moderation/mute.js +++ b/cmds/moderation/mute.js @@ -120,7 +120,11 @@ module.exports = class mute extends commando.Command { for (const EXEC of targetUsers) { try { - await EXEC.mute(msg.guild, { duration: duration, infraction: infractionToDoc.infraction, moderator: msg.member }, reason); + await EXEC.mute(msg.guild, { + duration: duration, + infraction: infractionToDoc.infraction, + moderator: msg.member + }, reason); muted.push(EXEC.id); } catch (e) { if (/Missing Permissions|someone with higher position/.test(e.message)) cant.push(EXEC.id); @@ -146,7 +150,8 @@ module.exports = class mute extends commando.Command { mutedStr = mutedStr.slice(0, -2); if (mutedArr.length) mutedStr += ` and ${mutedArr.length} more...`; - if (already.length) emb.addField("Already muted", "<@" + already.join(">, <@") + ">\n\nDuration updated for these users"); + if (already.length) emb.addField("Already muted", "<@" + already.join(">, <@") + + ">\n\nDuration updated for these users"); emb.addField("Muted", mutedStr || "`[NONE]`") .addField("At", defaultDateFormat(duration.invoked), true) @@ -154,7 +159,8 @@ module.exports = class mute extends commando.Command { } emb.addField("For", duration.duration?.strings.join(" ") || "Indefinite"); - if (cant.length) emb.addField("Can't mute", "<@" + cant.join(">, <@") + ">\n\n**You can't mute someone with higher position than you <:nekokekLife:852865942530949160>**"); + if (cant.length) emb.addField("Can't mute", "<@" + cant.join(">, <@") + + ">\n\n**You can't mute someone with the same or higher position than you <:nekokekLife:852865942530949160>**"); return trySend(msg.client, msg, { content: resultMsg, embed: emb }); }