Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2024-09-25 21:34:37 -04:00
commit 76c91b0fc3
16 changed files with 67 additions and 66 deletions

View file

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