From 61ef46ff3036d5feca5b90b43db3a83b14a8bbb1 Mon Sep 17 00:00:00 2001 From: Souji Date: Fri, 6 Mar 2020 07:00:49 +0100 Subject: [PATCH] fix: adapt #manageable to check for CONNECT for VoiceChannel (#3885) --- src/structures/GuildChannel.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 27a646be8..2e80eca71 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -566,7 +566,13 @@ class GuildChannel extends Channel { */ get manageable() { if (this.client.user.id === this.guild.ownerID) return true; - if (!this.viewable) return false; + if (this.type === 'voice') { + if (!this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT, false)) { + return false; + } + } else if (!this.viewable) { + return false; + } return this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false); }