diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index b694ea822..b38a8cac1 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -539,6 +539,17 @@ class GuildChannel extends Channel { return 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); + return permissions && permissions.has([Permissions.FLAGS.MANAGE_CHANNELS, Permissions.FLAGS.VIEW_CHANNEL]); + } + /** * Deletes this channel. * @param {string} [reason] Reason for deleting this channel