fix(GuildChannel): always return a boolean from the manageable getter

Overlooked the comment pointing that out in #2439
This commit is contained in:
Pascal
2018-04-02 20:52:12 +02:00
parent ef4bd92c8a
commit e431ccdad2

View File

@@ -547,7 +547,8 @@ class GuildChannel extends Channel {
get manageable() {
if (this.client.user.id === this.guild.ownerID) return true;
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]);
}
/**