mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
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:
@@ -239,7 +239,7 @@ class Client extends BaseClient {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
isReady() {
|
isReady() {
|
||||||
return this.ws.status === Status.Ready;
|
return !this.ws.destroyed && this.ws.status === Status.Ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user