mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 16:22:08 +00:00
fix(GuildChannel): always return a boolean from the manageable getter
Overlooked the comment pointing that out in #2439
This commit is contained in:
parent
ef4bd92c8a
commit
e431ccdad2
1 changed files with 2 additions and 1 deletions
|
|
@ -547,7 +547,8 @@ 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;
|
||||||
const permissions = this.permissionsFor(this.client.user);
|
const permissions = this.permissionsFor(this.client.user);
|
||||||
return permissions && permissions.has([Permissions.FLAGS.MANAGE_CHANNELS, Permissions.FLAGS.VIEW_CHANNEL]);
|
if (!permissions) return false;
|
||||||
|
return permissions.has([Permissions.FLAGS.MANAGE_CHANNELS, Permissions.FLAGS.VIEW_CHANNEL]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue