Skip to content

Commit

Permalink
fix(GuildChannel): check for community required channels in GuildChan…
Browse files Browse the repository at this point in the history
…nel#deletable (#5170)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
  • Loading branch information
xiBread and SpaceEEC committed Apr 14, 2021
1 parent aff3625 commit b710a43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/structures/GuildChannel.js
Expand Up @@ -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
);
}

/**
Expand Down

0 comments on commit b710a43

Please sign in to comment.