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

!ban: only run isBanned() if member is not found

This commit is contained in:
Dragory 2021-04-28 21:24:56 +03:00
parent d747ac3982
commit c7c1b1f96f
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -66,8 +66,8 @@ export const BanCmd = modActionsCmd({
const lock = await pluginData.locks.acquire(banLock(user));
let forceban = false;
const existingTempban = await pluginData.state.tempbans.findExistingTempbanForUserId(user.id);
const banned = await isBanned(pluginData, user.id);
if (!memberToBan) {
const banned = await isBanned(pluginData, user.id);
if (banned) {
// Abort if trying to ban user indefinitely if they are already banned indefinitely
if (!existingTempban && !time) {