From 722dcb033ed25e33321bd912e36b6be0a1d0b828 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 25 Oct 2023 23:50:19 +0200 Subject: [PATCH] Fix RelationShipNotifier --- src/plugins/relationshipNotifier/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/relationshipNotifier/index.ts b/src/plugins/relationshipNotifier/index.ts index 7300fba8..d913dde4 100644 --- a/src/plugins/relationshipNotifier/index.ts +++ b/src/plugins/relationshipNotifier/index.ts @@ -31,23 +31,23 @@ export default definePlugin({ patches: [ { - find: "removeRelationship:function(", + find: "removeRelationship:(", replacement: { - match: /(removeRelationship:function\((\i),\i,\i\){)/, - replace: "$1$self.removeFriend($2);" + match: /(removeRelationship:\((\i),\i,\i\)=>)/, + replace: "$1($self.removeFriend($2),0)||" } }, { - find: "leaveGuild:function(", + find: "async leaveGuild(", replacement: { - match: /(leaveGuild:function\((\i)\){)/, + match: /(leaveGuild\((\i)\){)/, replace: "$1$self.removeGuild($2);" } }, { - find: "closePrivateChannel:function(", + find: "},closePrivateChannel(", replacement: { - match: /(closePrivateChannel:function\((\i)\){)/, + match: /(closePrivateChannel\((\i)\){)/, replace: "$1$self.removeGroup($2);" } }