From 95a03a01106e096f72777d47d07564b33cab9084 Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Wed, 29 Jul 2020 00:27:27 +0300
Subject: [PATCH] Fix !nickname permission check

---
 backend/src/plugins/Utility/commands/NicknameCmd.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/src/plugins/Utility/commands/NicknameCmd.ts b/backend/src/plugins/Utility/commands/NicknameCmd.ts
index 089e3c7e..1d187d0e 100644
--- a/backend/src/plugins/Utility/commands/NicknameCmd.ts
+++ b/backend/src/plugins/Utility/commands/NicknameCmd.ts
@@ -15,7 +15,7 @@ export const NicknameCmd = utilityCmd({
   },
 
   async run({ message: msg, args, pluginData }) {
-    if (msg.member.id !== args.member.id && canActOn(pluginData, msg.member, args.member)) {
+    if (msg.member.id !== args.member.id && !canActOn(pluginData, msg.member, args.member)) {
       msg.channel.createMessage(errorMessage("Cannot change nickname: insufficient permissions"));
       return;
     }