mirror of
https://github.com/danbulant/Shasha
synced 2026-06-24 17:12:01 +00:00
fix notif message
This commit is contained in:
parent
a0082ee4cf
commit
dd51b3df13
2 changed files with 15 additions and 6 deletions
|
|
@ -45,7 +45,8 @@ module.exports = class ban extends commando.Command {
|
||||||
if (ARG === "--" || ARG.trim().length < 1) continue;
|
if (ARG === "--" || ARG.trim().length < 1) continue;
|
||||||
if (ARG.startsWith("d ")) {
|
if (ARG.startsWith("d ")) {
|
||||||
const U = ARG.slice(2).trim();
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
else if (CHECK_FOR_DURATION_REGEXP.test(ARG.trim()))
|
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);
|
bannedStr = bannedStr.slice(0, -2);
|
||||||
|
|
||||||
if (bannedArr.length) bannedStr += ` and ${bannedArr.length} more...`;
|
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]`")
|
emb.addField("Banned", bannedStr || "`[NONE]`")
|
||||||
.addField("At", defaultDateFormat(pDuration.invoked), true)
|
.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");
|
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 });
|
return trySend(msg.client, msg, { content: resultMsg, embed: emb });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,11 @@ module.exports = class mute extends commando.Command {
|
||||||
|
|
||||||
for (const EXEC of targetUsers) {
|
for (const EXEC of targetUsers) {
|
||||||
try {
|
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);
|
muted.push(EXEC.id);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (/Missing Permissions|someone with higher position/.test(e.message)) cant.push(EXEC.id);
|
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);
|
mutedStr = mutedStr.slice(0, -2);
|
||||||
|
|
||||||
if (mutedArr.length) mutedStr += ` and ${mutedArr.length} more...`;
|
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]`")
|
emb.addField("Muted", mutedStr || "`[NONE]`")
|
||||||
.addField("At", defaultDateFormat(duration.invoked), true)
|
.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");
|
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 });
|
return trySend(msg.client, msg, { content: resultMsg, embed: emb });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue