From 6c5f9ee49bfcbcc95f92e3d7a01fbb784c3daede Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Sat, 25 Jun 2022 03:13:36 -0400 Subject: [PATCH] Update crash dialog Closes #897 Fixes #1304 via compromise --- injector/src/modules/betterdiscord.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/injector/src/modules/betterdiscord.js b/injector/src/modules/betterdiscord.js index 74cb0b66..608b2494 100644 --- a/injector/src/modules/betterdiscord.js +++ b/injector/src/modules/betterdiscord.js @@ -94,10 +94,19 @@ export default class BetterDiscord { // If a previous crash was detected, show a message explaining why BD isn't there electron.dialog.showMessageBox({ - title: "BetterDiscord Crashed", + title: "Discord Crashed", type: "warning", - message: "BetterDiscord seems to have crashed your Discord client.", - detail: "BetterDiscord has automatically disabled itself temporarily. Try removing all your plugins then restarting Discord." + message: "Something crashed your Discord Client", + detail: "BetterDiscord has automatically disabled itself just in case. To enable it again, restart Discord or click the button below.\n\nThis may have been caused by a plugin. Try moving all of your plugins outside the plugin folder and see if Discord still crashed.", + buttons: ["Try Again", "Open Plugins Folder", "Cancel"], + }).then((result)=>{ + if (result.response === 0) { + electron.app.relaunch(); + electron.app.exit(); + } + if (result.response === 1) { + electron.shell.openPath(path.join(dataPath, "plugins")); + } }); hasCrashed = false; });