fix: shard state incorrect after receiving ready event

This commit is contained in:
Logan
2026-01-10 07:45:12 +00:00
parent 5ff9822759
commit 2592bf6c71
+1 -1
View File
@@ -730,7 +730,6 @@ export class DiscordenoShard {
break
case 'READY': {
const payload = packet.d as DiscordReady
this.events.ready?.(this)
// Important for future resumes.
this.resumeGatewayUrl = payload.resume_gateway_url
@@ -739,6 +738,7 @@ export class DiscordenoShard {
this.state = ShardState.Connected
this.logger.debug(`[Shard] Shard #${this.id} received READY`)
this.events.ready?.(this)
// Continue the requests which have been queued since the shard went offline.
// Important when this is a re-identify