Some Fixes

This commit is contained in:
thororen1234 2024-12-12 02:28:21 -05:00
parent fc7827a2f0
commit ccdd779396
2 changed files with 3 additions and 3 deletions

View file

@ -57,8 +57,8 @@ export default definePlugin({
predicate: () => Settings.plugins.BlockKeywords.ignoreBlockedMessages && !Settings.plugins.NoBlockedMessages.ignoreBlockedMessages, predicate: () => Settings.plugins.BlockKeywords.ignoreBlockedMessages && !Settings.plugins.NoBlockedMessages.ignoreBlockedMessages,
replacement: [ replacement: [
{ {
match: /(?<=MESSAGE_CREATE:function\((\i)\){)/, match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,
replace: (_, props) => `if($self.containsBlockedKeywords(${props}.message))return;` replace: (_, _funcName, props) => `if($self.containsBlockedKeywords(${props}.message))return;`
} }
] ]
})), })),

View file

@ -72,7 +72,7 @@ export default definePlugin({
replacement: [ replacement: [
{ {
match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/, 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;`
} }
] ]
})), })),