diff --git a/src/client/Client.js b/src/client/Client.js index e48f3b1ae..afbccbdd3 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -190,7 +190,7 @@ class Client extends EventEmitter { * @readonly */ get status() { - return this.ws.status; + return this.ws.connection.status; } /** diff --git a/src/structures/Guild.js b/src/structures/Guild.js index f6c98a433..309dd35f9 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -897,7 +897,7 @@ class Guild { * @event Client#guildMemberAdd * @param {GuildMember} member The member that has joined a guild */ - if (this.client.ws.status === Constants.Status.READY && emitEvent && !existing) { + if (this.client.ws.connection.status === Constants.Status.READY && emitEvent && !existing) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, member); } @@ -912,7 +912,7 @@ class Guild { const notSame = member.nickname !== oldMember.nickname || !Util.arraysEqual(member._roles, oldMember._roles); - if (this.client.ws.status === Constants.Status.READY && notSame) { + if (this.client.ws.connection.status === Constants.Status.READY && notSame) { /** * Emitted whenever a guild member changes - i.e. new role, removed role, nickname * @event Client#guildMemberUpdate