fix(Client): Ensure destroyed connections are not ready (#9942)

* 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>
This commit is contained in:
Jiralite 2023-11-12 17:06:42 +01:00 committed by GitHub
parent 81e7866903
commit b5e23ec2ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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