From 5e8d0986614a61bb3e147b5f1f61951978847a38 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 2 May 2019 08:51:48 +0300 Subject: [PATCH] Temp fix for AFK channel move on mute --- src/plugins/Mutes.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/Mutes.ts b/src/plugins/Mutes.ts index ebb1d2b4..2c2f42f0 100644 --- a/src/plugins/Mutes.ts +++ b/src/plugins/Mutes.ts @@ -134,12 +134,11 @@ export class MutesPlugin extends ZeppelinPlugin { // If enabled, move the user to the mute voice channel (e.g. afk - just to apply the voice perms from the mute role) const moveToVoiceChannelId = this.getConfig().move_to_voice_channel; - if (moveToVoiceChannelId && member.voiceState.channelID) { + if (moveToVoiceChannelId) { + // TODO: Add back the voiceState check once we figure out how to get voice state for guild members that are loaded on-demand try { await member.edit({ channelID: moveToVoiceChannelId }); - } catch (e) { - logger.warn(`Could not move user ${member.id} to voice channel ${moveToVoiceChannelId} when muting`); - } + } catch (e) {} // tslint:disable-line } }