fix(GuildChannel): check for community required channels in GuildChannel#deletable (#5170)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
Bread
2021-04-14 18:31:08 -04:00
committed by GitHub
parent aff3625d4f
commit b710a43232

View File

@@ -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
);
}
/**