diff --git a/packages/gateway/src/Shard.ts b/packages/gateway/src/Shard.ts index 40e3e64f2..73f735156 100644 --- a/packages/gateway/src/Shard.ts +++ b/packages/gateway/src/Shard.ts @@ -172,9 +172,6 @@ export class DiscordenoShard { await this.connect() } - // Wait until an identify is free for this this. - await this.requestIdentify() - this.send( { op: GatewayOpcodes.Identify, @@ -426,7 +423,7 @@ export class DiscordenoShard { // When resumable is false we need to re-identify if (!resumable) { - await this.identify() + await this.requestIdentify() break } diff --git a/packages/gateway/src/manager.ts b/packages/gateway/src/manager.ts index 1baacda68..b986c4d4d 100644 --- a/packages/gateway/src/manager.ts +++ b/packages/gateway/src/manager.ts @@ -164,8 +164,7 @@ export function createGatewayManager(options: CreateGatewayManagerOptions): Gate }, events: options.events, requestIdentify: async () => { - // TODO: remove this entire concept, its much easier to do in reality. - // await gateway.buckets.get(shardId % gateway.connection.sessionStartLimit.maxConcurrency)!.leak.acquire(shardId) + return await gateway.identify(shardId); }, shardIsReady: async () => { logger.debug(`[Shard] Shard #${shardId} is ready`)