From ccdd7793963d246cb55e9e22052ffab423d2ac44 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 12 Dec 2024 02:28:21 -0500 Subject: [PATCH] Some Fixes --- src/equicordplugins/blockKeywords/index.ts | 4 ++-- src/plugins/noBlockedMessages/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/equicordplugins/blockKeywords/index.ts b/src/equicordplugins/blockKeywords/index.ts index 7896cc32..294ce233 100644 --- a/src/equicordplugins/blockKeywords/index.ts +++ b/src/equicordplugins/blockKeywords/index.ts @@ -57,8 +57,8 @@ export default definePlugin({ predicate: () => Settings.plugins.BlockKeywords.ignoreBlockedMessages && !Settings.plugins.NoBlockedMessages.ignoreBlockedMessages, replacement: [ { - match: /(?<=MESSAGE_CREATE:function\((\i)\){)/, - replace: (_, props) => `if($self.containsBlockedKeywords(${props}.message))return;` + match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/, + replace: (_, _funcName, props) => `if($self.containsBlockedKeywords(${props}.message))return;` } ] })), diff --git a/src/plugins/noBlockedMessages/index.ts b/src/plugins/noBlockedMessages/index.ts index 66b4e9f1..986bdaf8 100644 --- a/src/plugins/noBlockedMessages/index.ts +++ b/src/plugins/noBlockedMessages/index.ts @@ -72,7 +72,7 @@ export default definePlugin({ replacement: [ { match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/, - replace: (_, _funcName, props) => `if($self.isBlocked(${props}.message))return;` + replace: (_, _funcName, props) => `if($self.isBlocked(${props}.message))||$self.isReplyToBlocked(${props}.message))return;` } ] })),