mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 04:56: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.applicationId = packet.d.application.id;
|
||||
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 (
|
||||
!(
|
||||
this.__handleGuilds?.size &&
|
||||
@ -203,6 +202,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
||||
delete this.__handleGuilds;
|
||||
}
|
||||
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;
|
||||
default:
|
||||
await this.events?.execute(packet.t as never, packet, this as Client<true>, shardId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user