From c4ae36c74581e2651d0a0ab317e38f101f6db10e Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 13 May 2019 00:34:12 +0300 Subject: [PATCH] Check if the user is already banned in !forceban --- src/plugins/ModActions.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/ModActions.ts b/src/plugins/ModActions.ts index 5d421b5b..6c777811 100644 --- a/src/plugins/ModActions.ts +++ b/src/plugins/ModActions.ts @@ -1015,6 +1015,13 @@ export class ModActionsPlugin extends ZeppelinPlugin { return; } + // Make sure the user isn't already banned + const isBanned = await this.isBanned(user.id); + if (isBanned) { + this.sendErrorMessage(msg.channel, `User is already banned`); + return; + } + // The moderator who did the action is the message author or, if used, the specified --mod let mod = msg.member; if (args.mod) {