mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
fix: botReady emits twice
This commit is contained in:
parent
b30b6dde24
commit
98c755dac7
@ -190,7 +190,6 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|||||||
this.botId = packet.d.user.id;
|
this.botId = packet.d.user.id;
|
||||||
this.applicationId = packet.d.application.id;
|
this.applicationId = packet.d.application.id;
|
||||||
this.me = Transformers.ClientUser(this, packet.d.user, packet.d.application) as never;
|
this.me = Transformers.ClientUser(this, packet.d.user, packet.d.application) as never;
|
||||||
await this.events?.execute(packet.t as never, packet, this as Client<true>, shardId);
|
|
||||||
if (
|
if (
|
||||||
!(
|
!(
|
||||||
this.__handleGuilds?.size &&
|
this.__handleGuilds?.size &&
|
||||||
@ -203,6 +202,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|||||||
delete this.__handleGuilds;
|
delete this.__handleGuilds;
|
||||||
}
|
}
|
||||||
this.debugger?.debug(`#${shardId}[${packet.d.user.username}](${this.botId}) is online...`);
|
this.debugger?.debug(`#${shardId}[${packet.d.user.username}](${this.botId}) is online...`);
|
||||||
|
await this.events?.execute(packet.t as never, packet, this as Client<true>, shardId);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
await this.events?.execute(packet.t as never, packet, this as Client<true>, shardId);
|
await this.events?.execute(packet.t as never, packet, this as Client<true>, shardId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user