fix(xxxable): follow more properly with discord behavior (#6551)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
tig
2021-09-23 20:41:18 +09:00
committed by GitHub
parent 603350645d
commit 5d87398f9f
3 changed files with 29 additions and 28 deletions

View File

@@ -497,11 +497,7 @@ class GuildChannel extends Channel {
* @readonly
*/
get deletable() {
return (
this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false) &&
this.guild.rulesChannelId !== this.id &&
this.guild.publicUpdatesChannelId !== this.id
);
return this.manageable && this.guild.rulesChannelId !== this.id && this.guild.publicUpdatesChannelId !== this.id;
}
/**