diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index bf462e5..4ff7e8c 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -460,7 +460,7 @@ function createMainWindow() { const uri = process.argv.find(arg => arg.startsWith("discord://")); const loadUrl = (url: string | undefined) => { - win.loadURL(`https://${subdomain}discord.com${url?.substring("discord://".length) || "/app"}`); + win.loadURL(`https://${subdomain}discord.com/${url?.replace(RegExp("^discord://[^/]*/?"), "") || "app"}`); }; let uriFiredDarwin = false;