diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts index 4918f1b51..7fea1a279 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts @@ -171,12 +171,9 @@ export class Server { await Config.init(); await initEvent(); // temporary fix - console.log("[Gateway] Clearing voice states"); await cleanupOnStartup(); - console.log("[Gateway] dbg checking if server is listening"); if (!this.server.listening) { - console.log("gonna start listening on", this.port); this.server.listen(this.port); console.log(`[Gateway] online on 0.0.0.0:${this.port}`); } diff --git a/src/gateway/util/Utils.ts b/src/gateway/util/Utils.ts index 1757b8458..a629751b7 100644 --- a/src/gateway/util/Utils.ts +++ b/src/gateway/util/Utils.ts @@ -53,9 +53,8 @@ export async function cleanupOnStartup(): Promise { // }, //); - try { - await VoiceState.clear(); - } catch (e) { - console.error("Error clearing voice states on startup:", e); - } + console.log("[Gateway] Starting async voice state wipe..."); + VoiceState.clear() + .then((e) => console.log("[Gateway] Successfully cleaned voice states")) + .catch((e) => console.error("[Gateway] Error cleaning voice states on startup:", e)); }