Fix multiple plugins (again)

This commit is contained in:
Nuckyz 2024-10-05 08:01:40 -03:00
parent 1e01f85217
commit b5f626d1ff
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
11 changed files with 64 additions and 98 deletions

View file

@ -47,14 +47,14 @@ export default definePlugin({
},
...[
'"MessageStore"',
'"displayName","ReadStateStore")'
'"ReadStateStore"'
].map(find => ({
find,
predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true,
replacement: [
{
match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,
replace: (_, _funcName, props) => `if($self.isBlocked(${props}.message))return;`
match: /(?<=MESSAGE_CREATE:function\((\i)\){)/,
replace: (_, props) => `if($self.isBlocked(${props}.message))return;`
}
]
}))