diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index ef5687c43..7b26adf58 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -281,6 +281,16 @@ class GuildChannel extends Channel { return equal; } + /** + * Whether the channel is deletable by the client user. + * @type {boolean} + * @readonly + */ + get deletable() { + return this.id !== this.guild.id && + this.permissionsFor(this.client.user).hasPermission(Constants.PermissionFlags.MANAGE_CHANNELS); + } + /** * When concatenated with a string, this automatically returns the channel's mention instead of the Channel object. * @returns {string}