🐛 fix fosscord.js

This commit is contained in:
Flam3rboy
2021-09-13 17:51:37 +02:00
parent dcc3ae6a14
commit 8568b3cdce
3 changed files with 18 additions and 2 deletions
+3 -2
View File
@@ -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);
}
}