Repository: discordjs/discord.js
File: packages/ws/src/ws/WebSocketShard.ts (TypeScript)

Code before:
				return this.parseInflateResult(result);
			} else if (this.zLibSyncInflate) {
				const zLibSync = (await getZlibSync())!;
				this.zLibSyncInflate.push(Buffer.from(decompressable), flush ? zLibSync.Z_SYNC_FLUSH : zLibSync.Z_NO_FLUSH);

				if (this.zLibSyncInflate.err) {
					this.emit(WebSocketShardEvents.Error, {
						error: new Error(
							`${this.zLibSyncInflate.err}${this.zLibSyncInflate.msg ? `: ${this.zLibSyncInflate.msg}` : ''}`,
						),
					});
				}

				if (!flush) {
					return null;
				}

				const { result } = this.zLibSyncInflate;
				return this.parseInflateResult(result);
			}
		}

		this.debug([
			'Received a message we were unable to decompress',
			`isBinary: ${isBinary.toString()}`,
			`useIdentifyCompression: ${this.identifyCompressionEnabled.toString()}`,
			`inflate: ${this.transportCompressionEnabled ? CompressionMethod[this.strategy.options.compression!] : 'none'}`,
		]);

		return null;
	}

	private async onMessage(data: Data, isBinary: boolean) {
		const payload = await this.unpackMessage(data, isBinary);
		if (!payload) {
			return;
		}

		switch (payload.op) {
			case GatewayOpcodes.Dispatch: {
				if (this.#status === WebSocketShardStatus.Resuming) {
					this.replayedEvents++;
				}

				// eslint-disable-next-line sonarjs/no-nested-switch
				switch (payload.t) {
					case GatewayDispatchEvents.Ready: {
						this.#status = WebSocketShardStatus.Ready;

						const session = {
							sequence: payload.s,

Review comment (suggestion):
```suggestion
			`identifyCompressionEnabled: ${this.identifyCompressionEnabled.toString()}`,
```
missed it again :P

Code after:
				return this.parseInflateResult(result);
			} else if (this.zLibSyncInflate) {
				const zLibSync = (await getZlibSync())!;
				this.zLibSyncInflate.push(Buffer.from(decompressable), flush ? zLibSync.Z_SYNC_FLUSH : zLibSync.Z_NO_FLUSH);

				if (this.zLibSyncInflate.err) {
					this.emit(WebSocketShardEvents.Error, {
						error: new Error(
							`${this.zLibSyncInflate.err}${this.zLibSyncInflate.msg ? `: ${this.zLibSyncInflate.msg}` : ''}`,
						),
					});
				}

				if (!flush) {
					return null;
				}

				const { result } = this.zLibSyncInflate;
				return this.parseInflateResult(result);
			}
		}

		this.debug([
			'Received a message we were unable to decompress',
			`isBinary: ${isBinary.toString()}`,
			`identifyCompressionEnabled: ${this.identifyCompressionEnabled.toString()}`,
			`inflate: ${this.transportCompressionEnabled ? CompressionMethod[this.strategy.options.compression!] : 'none'}`,
		]);

		return null;
	}

	private async onMessage(data: Data, isBinary: boolean) {
		const payload = await this.unpackMessage(data, isBinary);
		if (!payload) {
			return;
		}

		switch (payload.op) {
			case GatewayOpcodes.Dispatch: {
				if (this.#status === WebSocketShardStatus.Resuming) {
					this.replayedEvents++;
				}

				// eslint-disable-next-line sonarjs/no-nested-switch
				switch (payload.t) {
					case GatewayDispatchEvents.Ready: {
						this.#status = WebSocketShardStatus.Ready;

						const session = {
							sequence: payload.s,