diff --git a/packages/gateway/src/Shard.ts b/packages/gateway/src/Shard.ts index e5a164ef9..eb5c45b23 100644 --- a/packages/gateway/src/Shard.ts +++ b/packages/gateway/src/Shard.ts @@ -95,7 +95,6 @@ export class DiscordenoShard { } if (options.requestIdentify) this.requestIdentify = options.requestIdentify - if (options.shardIsReady) this.shardIsReady = options.shardIsReady if (options.makePresence) this.makePresence = options.makePresence this.bucket = new LeakyBucket({ @@ -310,8 +309,6 @@ export class DiscordenoShard { return await new Promise((resolve) => { this.resolves.set('READY', () => { this.events.identified?.(this) - // Tells the manager that this shard is ready - this.shardIsReady() resolve() }) // When identifying too fast, Discord sends an invalid session payload. @@ -735,9 +732,6 @@ export class DiscordenoShard { */ async requestIdentify(): Promise {} - /** This function communicates with the management process, in order to tell it can identify the next shard. */ - async shardIsReady(): Promise {} - /** Start sending heartbeat payloads to Discord in the provided interval. */ startHeartbeating(interval: number): void { this.logger.debug(`[Shard] Start heartbeating on Shard #${this.id}`) @@ -845,8 +839,6 @@ export interface ShardCreateOptions { logger?: Pick /** The handler to request a space to make an identify request. */ requestIdentify?: () => Promise - /** The handler to alert the gateway manager that this shard has identified. */ - shardIsReady?: () => Promise /** Function to create the bot status to send on Identify requests */ makePresence?: () => Promise } diff --git a/packages/gateway/src/manager.ts b/packages/gateway/src/manager.ts index d359d9953..2d213ee07 100644 --- a/packages/gateway/src/manager.ts +++ b/packages/gateway/src/manager.ts @@ -165,9 +165,6 @@ export function createGatewayManager(options: CreateGatewayManagerOptions): Gate }, logger: gateway.logger, requestIdentify: async () => await gateway.requestIdentify(shardId), - shardIsReady: async () => { - gateway.logger.debug(`[Gateway] Shard #${shardId} has identified.`) - }, makePresence: gateway.makePresence, }) @@ -372,9 +369,6 @@ export function createGatewayManager(options: CreateGatewayManagerOptions): Gate events: options.events ?? {}, logger: this.logger, requestIdentify: async () => await gateway.requestIdentify(shardId), - shardIsReady: async () => { - gateway.logger.debug(`[Gateway] Shard #${shardId} has identified.`) - }, makePresence: gateway.makePresence, })