mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
More deprecated stuff
This commit is contained in:
@@ -319,7 +319,7 @@ class GuildChannel extends Channel {
|
|||||||
*/
|
*/
|
||||||
get deletable() {
|
get deletable() {
|
||||||
return this.id !== this.guild.id &&
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ class Message {
|
|||||||
*/
|
*/
|
||||||
get deletable() {
|
get deletable() {
|
||||||
return this.author.id === this.client.user.id || (this.guild &&
|
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() {
|
get pinnable() {
|
||||||
return !this.guild ||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class TextChannel extends GuildChannel {
|
|||||||
get members() {
|
get members() {
|
||||||
const members = new Collection();
|
const members = new Collection();
|
||||||
for (const member of this.guild.members.values()) {
|
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);
|
members.set(member.id, member);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ class VoiceChannel extends GuildChannel {
|
|||||||
*/
|
*/
|
||||||
get joinable() {
|
get joinable() {
|
||||||
if (this.client.browser) return false;
|
if (this.client.browser) return false;
|
||||||
if (!this.permissionsFor(this.client.user).hasPermission('CONNECT')) return false;
|
if (!this.permissionsFor(this.client.user).has('CONNECT')) return false;
|
||||||
if (this.full && !this.permissionsFor(this.client.user).hasPermission('MOVE_MEMBERS')) return false;
|
if (this.full && !this.permissionsFor(this.client.user).has('MOVE_MEMBERS')) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ class VoiceChannel extends GuildChannel {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get speakable() {
|
get speakable() {
|
||||||
return this.permissionsFor(this.client.user).hasPermission('SPEAK');
|
return this.permissionsFor(this.client.user).has('SPEAK');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user