diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 735ce3bd9..6833a5b1c 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -380,6 +380,18 @@ class GuildChannel extends Channel { this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS); } + /** + * Whether the channel is manageable by the client user + * @type {boolean} + * @readonly + */ + get manageable() { + if (this.client.user.id === this.guild.ownerID) return true; + const permissions = this.permissionsFor(this.client.user); + if (!permissions) return false; + return permissions.has([Permissions.FLAGS.MANAGE_CHANNELS, Permissions.FLAGS.VIEW_CHANNEL]); + } + /** * Whether the channel is muted * This is only available when using a user account.