mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
fix: adapt #manageable to check for CONNECT for VoiceChannel (#3885)
This commit is contained in:
parent
0066d0089e
commit
61ef46ff30
1 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue