mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
fix: adapt #manageable to check for CONNECT for VoiceChannel (#3885)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user