Skip to content

Commit 61ef46f

Browse files
authored
fix: adapt #manageable to check for CONNECT for VoiceChannel (#3885)
1 parent 0066d00 commit 61ef46f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/structures/GuildChannel.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,13 @@ class GuildChannel extends Channel {
566566
*/
567567
get manageable() {
568568
if (this.client.user.id === this.guild.ownerID) return true;
569-
if (!this.viewable) return false;
569+
if (this.type === 'voice') {
570+
if (!this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT, false)) {
571+
return false;
572+
}
573+
} else if (!this.viewable) {
574+
return false;
575+
}
570576
return this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false);
571577
}
572578

0 commit comments

Comments
 (0)