From b710a432326be823beb10f5f06f2a1e3fcd7c0ee Mon Sep 17 00:00:00 2001 From: Bread <60681223+vBread@users.noreply.github.com> Date: Wed, 14 Apr 2021 18:31:08 -0400 Subject: [PATCH] fix(GuildChannel): check for community required channels in GuildChannel#deletable (#5170) Co-authored-by: SpaceEEC --- src/structures/GuildChannel.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 3d3188753..d3fb139d8 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -587,7 +587,11 @@ class GuildChannel extends Channel { * @readonly */ get deletable() { - return this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false); + return ( + this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false) && + this.guild.rulesChannelID !== this.id && + this.guild.publicUpdatesChannelID !== this.id + ); } /**