More deprecated stuff

This commit is contained in:
Amish Shah
2017-05-01 11:28:48 +01:00
parent 8bab9fb122
commit db45d99d0c
4 changed files with 7 additions and 7 deletions

View File

@@ -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);
}
/**

View File

@@ -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);
}
/**

View File

@@ -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);
}
}

View File

@@ -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');
}
/**