summary refs log tree commit diff
path: root/gateway/src/opcodes/Identify.ts
diff options
context:
space:
mode:
Diffstat (limited to 'gateway/src/opcodes/Identify.ts')
-rw-r--r--gateway/src/opcodes/Identify.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts
index 9eb4cd32..f6a4478f 100644
--- a/gateway/src/opcodes/Identify.ts
+++ b/gateway/src/opcodes/Identify.ts
@@ -50,12 +50,13 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 		this.shard_id = identify.shard[0];
 		this.shard_count = identify.shard[1];
 		if (
-			!this.shard_count ||
-			!this.shard_id ||
+			this.shard_count == null ||
+			this.shard_id == null ||
 			this.shard_id >= this.shard_count ||
 			this.shard_id < 0 ||
 			this.shard_count <= 0
 		) {
+			console.log(identify.shard);
 			return this.close(CLOSECODES.Invalid_shard);
 		}
 	}