mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 04:56:07 +00:00
fix: cache
This commit is contained in:
parent
4061f00625
commit
449be8ea38
@ -161,7 +161,9 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
||||
if (this.__handleGuilds?.has(packet.d.id)) {
|
||||
this.__handleGuilds?.delete(packet.d.id);
|
||||
if (!this.__handleGuilds?.size && [...this.gateway.values()].every(shard => shard.data.session_id)) {
|
||||
await this.events?.runEvent('BOT_READY', this, this.me, -1);
|
||||
delete this.__handleGuilds;
|
||||
await this.cache.onPacket(packet);
|
||||
return this.events?.runEvent('BOT_READY', this, this.me, -1);
|
||||
}
|
||||
if (!this.__handleGuilds?.size) delete this.__handleGuilds;
|
||||
return this.cache.onPacket(packet);
|
||||
|
@ -381,11 +381,13 @@ export class WorkerClient<Ready extends boolean = boolean> extends BaseClient {
|
||||
if (this.__handleGuilds?.has(packet.d.id)) {
|
||||
this.__handleGuilds?.delete(packet.d.id);
|
||||
if (!this.__handleGuilds?.size && [...this.shards.values()].every(shard => shard.data.session_id)) {
|
||||
delete this.__handleGuilds;
|
||||
await this.cache.onPacket(packet);
|
||||
this.postMessage({
|
||||
type: 'WORKER_READY',
|
||||
workerId: this.workerId,
|
||||
} as WorkerReady);
|
||||
await this.events?.runEvent('WORKER_READY', this, this.me, -1);
|
||||
return this.events?.runEvent('WORKER_READY', this, this.me, -1);
|
||||
}
|
||||
if (!this.__handleGuilds?.size) delete this.__handleGuilds;
|
||||
return this.cache.onPacket(packet);
|
||||
|
Loading…
x
Reference in New Issue
Block a user