From bef5f75c879c0512811ac116a2052140cdbb53aa Mon Sep 17 00:00:00 2001
From: Dragory <2606411+Dragory@users.noreply.github.com>
Date: Thu, 2 May 2019 08:22:39 +0300
Subject: [PATCH] Add some extra logging for failed role removals on unmute

---
 src/plugins/Mutes.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/Mutes.ts b/src/plugins/Mutes.ts
index d7f22df6..ebb1d2b4 100644
--- a/src/plugins/Mutes.ts
+++ b/src/plugins/Mutes.ts
@@ -262,6 +262,10 @@ export class MutesPlugin extends ZeppelinPlugin<IMutesPluginConfig> {
         if (member.roles.includes(muteRole)) {
           await member.removeRole(muteRole);
         }
+      } else {
+        logger.warn(
+          `Member ${userId} not found in guild ${this.guild.name} (${this.guildId}) when attempting to unmute`,
+        );
       }
 
       await this.mutes.clear(userId);