3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 15:00:00 +00:00

Fixed ban command

This commit is contained in:
Lily Bergonzat 2024-02-22 02:44:46 +01:00
parent 2874a0cf83
commit a49bb81ce1

View file

@ -60,8 +60,7 @@ export async function actualBanCmd(
} else { } else {
forceban = true; forceban = true;
} }
} } else {
// Abort if trying to ban user indefinitely if they are already banned indefinitely // Abort if trying to ban user indefinitely if they are already banned indefinitely
if (!existingTempban && !time) { if (!existingTempban && !time) {
pluginData.getPlugin(CommonPlugin).sendErrorMessage(context, `User is already banned indefinitely.`); pluginData.getPlugin(CommonPlugin).sendErrorMessage(context, `User is already banned indefinitely.`);
@ -132,6 +131,7 @@ export async function actualBanCmd(
lock.unlock(); lock.unlock();
return; return;
} }
}
// Make sure we're allowed to ban this member if they are on the server // Make sure we're allowed to ban this member if they are on the server
if (!forceban && !canActOn(pluginData, author, memberToBan!)) { if (!forceban && !canActOn(pluginData, author, memberToBan!)) {