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-15 00:31:08 +02:00
committed by GitHub
co-authored by SpaceEEC
parent aff3625d4f
commit b710a43232
+5 -1
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
);
}
/**