diff --git a/build.mjs b/build.mjs index 68a3a9c..912fd20 100644 --- a/build.mjs +++ b/build.mjs @@ -56,4 +56,4 @@ try { } catch (e) { console.error("Build failed...", e); process.exit(1); -} \ No newline at end of file +} diff --git a/entry.js b/entry.js index 73411a5..8a530e0 100644 --- a/entry.js +++ b/entry.js @@ -5,14 +5,13 @@ console.log("Hello from Vendetta!"); try { await (await import("./src/index.ts")).default(); } catch (ex) { + console.log(ex?.stack ?? ex.toString()); const dialog = [ "Failed to load Vendetta!\n", - `Build Number: ${nativeModuleProxy.InfoDictionaryManager.Build}`, + `Build Number: ${(nativeModuleProxy.InfoDictionaryManager ?? nativeModuleProxy.RTNClientInfoManager).Build}`, `Vendetta: ${__vendettaVersion}`, ex?.stack || ex.toString(), ].join("\n"); - alert(dialog); - console.error(ex?.stack || ex.toString()); } -})(); \ No newline at end of file +})(); diff --git a/src/lib/debug.ts b/src/lib/debug.ts index c8ef9a5..908724d 100644 --- a/src/lib/debug.ts +++ b/src/lib/debug.ts @@ -48,7 +48,8 @@ export const versionHash: string = __vendettaVersion; export function getDebugInfo() { // Discord - const InfoDictionaryManager = RN.NativeModules.InfoDictionaryManager; + //! 173.13 renamed this to RTNClientInfoManager. + const InfoDictionaryManager = RN.NativeModules.InfoDictionaryManager ?? RN.NativeModules.RTNClientInfoManager; const DCDDeviceManager = RN.NativeModules.DCDDeviceManager; // Hermes @@ -116,4 +117,4 @@ export function getDebugInfo() { } )! } -} \ No newline at end of file +}