mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05:00
Updates To No Delete Safety
This commit is contained in:
parent
22316a9610
commit
870a9c940a
1 changed files with 4 additions and 5 deletions
|
@ -34,10 +34,9 @@ export default definePlugin({
|
||||||
settings,
|
settings,
|
||||||
async HandleGuildDeleteModal(server) {
|
async HandleGuildDeleteModal(server) {
|
||||||
if (settings.store.confirmModal) {
|
if (settings.store.confirmModal) {
|
||||||
Alerts.show({ title: "Delete server?", body: <p>It's permanent, if that wasn't obvious.</p>, confirmColor: Button.Colors.RED, confirmText: "Delete", onConfirm: () => GetPropsAndDeleteGuild(server.id), cancelText: "Cancel" });
|
return Alerts.show({ title: "Delete server?", body: <p>It's permanent, if that wasn't obvious.</p>, confirmColor: Button.Colors.RED, confirmText: "Delete", onConfirm: () => GetPropsAndDeleteGuild(server.id), cancelText: "Cancel" });
|
||||||
}
|
} else {
|
||||||
else {
|
return GetPropsAndDeleteGuild(server.id);
|
||||||
GetPropsAndDeleteGuild(server.id);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
patches: [
|
patches: [
|
||||||
|
@ -45,7 +44,7 @@ export default definePlugin({
|
||||||
find: ".DELETE,onClick(){let",
|
find: ".DELETE,onClick(){let",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /let \i=(\i).guild.toString\(\)/,
|
match: /let \i=(\i).guild.toString\(\)/,
|
||||||
replace: "$self.HandleGuildDeleteModal($1);return;$&"
|
replace: "$self.HandleGuildDeleteModal($1);$&"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue