diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 20ad3155d..16c8ddd87 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -319,7 +319,7 @@ class GuildChannel extends Channel { */ get deletable() { return this.id !== this.guild.id && - this.permissionsFor(this.client.user).hasPermission(Permissions.FLAGS.MANAGE_CHANNELS); + this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS); } /** diff --git a/src/structures/Message.js b/src/structures/Message.js index b2bd248f2..dfd5fdd2e 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -315,7 +315,7 @@ class Message { */ get deletable() { return this.author.id === this.client.user.id || (this.guild && - this.channel.permissionsFor(this.client.user).hasPermission(Permissions.FLAGS.MANAGE_MESSAGES) + this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES) ); } @@ -326,7 +326,7 @@ class Message { */ get pinnable() { return !this.guild || - this.channel.permissionsFor(this.client.user).hasPermission(Permissions.FLAGS.MANAGE_MESSAGES); + this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES); } /** diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 54d5ea2cb..20b3c54f3 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -35,7 +35,7 @@ class TextChannel extends GuildChannel { get members() { const members = new Collection(); for (const member of this.guild.members.values()) { - if (this.permissionsFor(member).hasPermission('READ_MESSAGES')) { + if (this.permissionsFor(member).has('READ_MESSAGES')) { members.set(member.id, member); } } diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index fda23dc0d..617b4eee0 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -61,8 +61,8 @@ class VoiceChannel extends GuildChannel { */ get joinable() { if (this.client.browser) return false; - if (!this.permissionsFor(this.client.user).hasPermission('CONNECT')) return false; - if (this.full && !this.permissionsFor(this.client.user).hasPermission('MOVE_MEMBERS')) return false; + if (!this.permissionsFor(this.client.user).has('CONNECT')) return false; + if (this.full && !this.permissionsFor(this.client.user).has('MOVE_MEMBERS')) return false; return true; } @@ -72,7 +72,7 @@ class VoiceChannel extends GuildChannel { * @readonly */ get speakable() { - return this.permissionsFor(this.client.user).hasPermission('SPEAK'); + return this.permissionsFor(this.client.user).has('SPEAK'); } /**