Skip to content

Commit

Permalink
fix(Client): Ensure destroyed connections are not ready (#9942)
Browse files Browse the repository at this point in the history
* fix(Client): ensure destroyed connections are not ready

* refactor(Client): prefer `!`

Co-authored-by: Aura <kyradiscord@gmail.com>

---------

Co-authored-by: Aura <kyradiscord@gmail.com>
  • Loading branch information
Jiralite and kyranet authored Nov 12, 2023
1 parent 81e7866 commit b5e23ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/client/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class Client extends BaseClient {
* @returns {boolean}
*/
isReady() {
return this.ws.status === Status.Ready;
return !this.ws.destroyed && this.ws.status === Status.Ready;
}

/**
Expand Down

0 comments on commit b5e23ec

Please sign in to comment.