From 8437156fd384f594e434b19b7ce217286f5780f3 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Wed, 9 Jun 2021 20:10:39 +0200 Subject: :bug: fix identify struct --- src/Server.ts | 2 +- src/opcodes/Identify.ts | 3 ++- src/schema/Identify.ts | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Server.ts b/src/Server.ts index e897090c..f59ac7f1 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -34,7 +34,7 @@ export class Server { await this.setupSchema(); await Config.init(); console.log("[DB] connected"); - this.server.listen(this.port); + if (!this.server.listening) this.server.listen(this.port); console.log(`[Gateway] online on 0.0.0.0:${this.port}`); } diff --git a/src/opcodes/Identify.ts b/src/opcodes/Identify.ts index 1a136dd3..3b007766 100644 --- a/src/opcodes/Identify.ts +++ b/src/opcodes/Identify.ts @@ -16,7 +16,8 @@ import { import { setupListener } from "../listener/listener"; import { IdentifySchema } from "../schema/Identify"; import { Send } from "../util/Send"; -import experiments from "./experiments.json"; +// import experiments from "./experiments.json"; +const experiments: any = []; import { check } from "./instanceOf"; // TODO: bot sharding diff --git a/src/schema/Identify.ts b/src/schema/Identify.ts index eaa2ff80..646c5f05 100644 --- a/src/schema/Identify.ts +++ b/src/schema/Identify.ts @@ -39,6 +39,7 @@ export const IdentifySchema = { $read_state_version: Number, $user_guild_settings_version: Number, }, + $v: Number, }; export interface IdentifySchema { @@ -78,4 +79,5 @@ export interface IdentifySchema { read_state_version?: number; user_guild_settings_version?: number; }; + v?: number; } -- cgit 1.5.1