diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts index e2135a13..acec90ad 100644 --- a/src/gateway/events/Connection.ts +++ b/src/gateway/events/Connection.ts @@ -31,14 +31,9 @@ import { Config, ErlpackType } from "@spacebar/util"; let erlpack: ErlpackType | null = null; try { - erlpack = require("erlpack") as ErlpackType; + erlpack = require("@yukikaze-bot/erlpack") as ErlpackType; } catch (e) { - console.log("Failed to import erlpack: ", e); - try { - erlpack = require("@yukikaze-bot/erlpack") as ErlpackType; - } catch (e) { - console.log("Failed to import @yukikaze-bot/erlpack: ", e); - } + console.log("Failed to import @yukikaze-bot/erlpack: ", e); } // TODO: check rate limit diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts index b21965ce..c20cee7a 100644 --- a/src/gateway/events/Message.ts +++ b/src/gateway/events/Message.ts @@ -29,14 +29,9 @@ const bigIntJson = BigIntJson({ storeAsString: true }); let erlpack: ErlpackType | null = null; try { - erlpack = require("erlpack") as ErlpackType; + erlpack = require("@yukikaze-bot/erlpack") as ErlpackType; } catch (e) { - console.log("Failed to import erlpack: ", e); - try { - erlpack = require("@yukikaze-bot/erlpack") as ErlpackType; - } catch (e) { - console.log("Failed to import @yukikaze-bot/erlpack: ", e); - } + console.log("Failed to import @yukikaze-bot/erlpack: ", e); } export async function Message(this: WebSocket, buffer: WS.Data) { diff --git a/src/gateway/util/Send.ts b/src/gateway/util/Send.ts index a1be8398..9b1eef6a 100644 --- a/src/gateway/util/Send.ts +++ b/src/gateway/util/Send.ts @@ -23,14 +23,9 @@ import path from "path"; import { ErlpackType, JSONReplacer } from "@spacebar/util"; let erlpack: ErlpackType | null = null; try { - erlpack = require("erlpack") as ErlpackType; + erlpack = require("@yukikaze-bot/erlpack") as ErlpackType; } catch (e) { - console.log("Failed to import erlpack: ", e); - try { - erlpack = require("@yukikaze-bot/erlpack") as ErlpackType; - } catch (e) { - console.log("Failed to import @yukikaze-bot/erlpack: ", e); - } + console.log("Failed to import @yukikaze-bot/erlpack: ", e); } // don't care