refactor(GuildMember): remove GuildMember#hasPermission (#5152)

* refactor(GuildMember): remove GuildMember#hasPermission

* refactor(GuildEmoji): remove use for `GuildMember#hasPermission`

* typings: remove `GuildMember#hasPermission`
This commit is contained in:
Ishmaam Khan
2021-01-24 16:50:58 +06:00
committed by GitHub
parent 80e1afb654
commit 5401b92aac
3 changed files with 1 additions and 19 deletions

View File

@@ -49,7 +49,7 @@ class GuildEmoji extends BaseGuildEmoji {
*/
get deletable() {
if (!this.guild.me) throw new Error('GUILD_UNCACHED_ME');
return !this.managed && this.guild.me.hasPermission(Permissions.FLAGS.MANAGE_EMOJIS);
return !this.managed && this.guild.me.permissions.has(Permissions.FLAGS.MANAGE_EMOJIS);
}
/**