fix: botReady guild unavailable bug

This commit is contained in:
MARCROCK22 2024-08-21 00:47:35 +00:00
parent ec0ddb64c9
commit 11fa0bb6d4
2 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
}
await this.events?.execute(packet.t, packet, this as Client<true>, shardId);
break;
case 'GUILD_DELETE':
case 'GUILD_CREATE': {
if (this.__handleGuilds?.has(packet.d.id)) {
this.__handleGuilds?.delete(packet.d.id);

View File

@ -376,6 +376,7 @@ export class WorkerClient<Ready extends boolean = boolean> extends BaseClient {
await this.events?.execute(packet.t, packet, this as WorkerClient<true>, shardId);
}
break;
case 'GUILD_DELETE':
case 'GUILD_CREATE': {
if (this.__handleGuilds?.has(packet.d.id)) {
this.__handleGuilds?.delete(packet.d.id);