From 35d2b8d1cfaad8ff92b6a812238d62b029a217a0 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 22 Oct 2022 19:05:50 +0200 Subject: patcher: Add back support for discord_arch_electron --- src/patcher.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/patcher.ts b/src/patcher.ts index 16c4728..11a7031 100644 --- a/src/patcher.ts +++ b/src/patcher.ts @@ -28,8 +28,12 @@ console.log("[Vencord] Starting up..."); // Our injector file at app/index.js const injectorPath = require.main!.filename; + +// special discord_arch_electron injection method +const asarName = injectorPath.endsWith("app.asar/index.js") ? "_app.asar" : "app.asar"; + // The original app.asar -const asarPath = join(dirname(injectorPath), "..", "app.asar"); +const asarPath = join(dirname(injectorPath), "..", asarName); const discordPkg = require(join(asarPath, "package.json")); require.main!.filename = join(asarPath, discordPkg.main); -- cgit