mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
fix(GuildChannel): always return a boolean from the manageable getter
Overlooked the comment pointing that out in #2439
This commit is contained in:
@@ -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]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user