From 5cb5e484c83d49a2fd848876f33f6ab3b4a0cd95 Mon Sep 17 00:00:00 2001 From: yofukashino Date: Sun, 20 Oct 2024 07:27:03 +0530 Subject: [PATCH] fix --- src/main/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index acbb2dc45..8479570e1 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -7,7 +7,8 @@ import { getSetting } from "./ipc/settings"; const electronPath = require.resolve("electron"); const discordPath = join(dirname(require.main!.filename), "..", "app.orig.asar"); -// require.main!.filename = discordMain; +const discordPackage = require(join(discordPath, "package.json")); +require.main!.filename = join(discordPath, discordPackage.main); Object.defineProperty(global, "appSettings", { set: (v /* : typeof global.appSettings*/) => { @@ -185,4 +186,4 @@ electron.app.once("ready", () => { // This module is required this way at runtime. require("./ipc"); -require("module")._load(discordPath); +require(discordPath);