mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
Replace local usages of GuildMember.id with user.id
This commit is contained in:
@@ -180,8 +180,8 @@ class GuildMember {
|
|||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
get kickable() {
|
get kickable() {
|
||||||
if (this.id === this.guild.ownerID) return false;
|
if (this.user.id === this.guild.ownerID) return false;
|
||||||
if (this.id === this.client.user.id) return false;
|
if (this.user.id === this.client.user.id) return false;
|
||||||
const clientMember = this.member(this.client.member);
|
const clientMember = this.member(this.client.member);
|
||||||
if (!clientMember.hasPermission(Constants.PermissionFlags.KICK_MEMBERS)) return false;
|
if (!clientMember.hasPermission(Constants.PermissionFlags.KICK_MEMBERS)) return false;
|
||||||
return clientMember.highestRole.position > this.highestRole.positon;
|
return clientMember.highestRole.position > this.highestRole.positon;
|
||||||
@@ -192,8 +192,8 @@ class GuildMember {
|
|||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
get bannable() {
|
get bannable() {
|
||||||
if (this.id === this.guild.ownerID) return false;
|
if (this.user.id === this.guild.ownerID) return false;
|
||||||
if (this.id === this.client.user.id) return false;
|
if (this.user.id === this.client.user.id) return false;
|
||||||
const clientMember = this.member(this.client.member);
|
const clientMember = this.member(this.client.member);
|
||||||
if (!clientMember.hasPermission(Constants.PermissionFlags.BAN_MEMBERS)) return false;
|
if (!clientMember.hasPermission(Constants.PermissionFlags.BAN_MEMBERS)) return false;
|
||||||
return clientMember.highestRole.position > this.highestRole.positon;
|
return clientMember.highestRole.position > this.highestRole.positon;
|
||||||
|
|||||||
Reference in New Issue
Block a user