mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +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() {
|
get manageable() {
|
||||||
if (this.client.user.id === this.guild.ownerID) return true;
|
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);
|
return this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user