From 870a9c940a721412e14074935db8d66a221a4a08 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 7 Jan 2025 20:57:38 -0500 Subject: [PATCH] Updates To No Delete Safety --- src/equicordplugins/noDeleteSafety/index.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/equicordplugins/noDeleteSafety/index.tsx b/src/equicordplugins/noDeleteSafety/index.tsx index 6a28ed2a..c2fc7505 100644 --- a/src/equicordplugins/noDeleteSafety/index.tsx +++ b/src/equicordplugins/noDeleteSafety/index.tsx @@ -34,10 +34,9 @@ export default definePlugin({ settings, async HandleGuildDeleteModal(server) { if (settings.store.confirmModal) { - Alerts.show({ title: "Delete server?", body:
It's permanent, if that wasn't obvious.
, confirmColor: Button.Colors.RED, confirmText: "Delete", onConfirm: () => GetPropsAndDeleteGuild(server.id), cancelText: "Cancel" }); - } - else { - GetPropsAndDeleteGuild(server.id); + return Alerts.show({ title: "Delete server?", body:It's permanent, if that wasn't obvious.
, confirmColor: Button.Colors.RED, confirmText: "Delete", onConfirm: () => GetPropsAndDeleteGuild(server.id), cancelText: "Cancel" }); + } else { + return GetPropsAndDeleteGuild(server.id); } }, patches: [ @@ -45,7 +44,7 @@ export default definePlugin({ find: ".DELETE,onClick(){let", replacement: { match: /let \i=(\i).guild.toString\(\)/, - replace: "$self.HandleGuildDeleteModal($1);return;$&" + replace: "$self.HandleGuildDeleteModal($1);$&" } } ]