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 16:06:42 +00:00
committed by GitHub
co-authored by Aura
parent 81e7866903
commit b5e23ec2ec
+1 -1
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;
}
/**