Fix multiple plugins for latest Discord update (#3072)

This commit is contained in:
sadan4 2024-12-12 01:47:55 -05:00 committed by Nuckyz
parent 464c4a9b61
commit 2dc8c2bf76
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
9 changed files with 41 additions and 43 deletions

View file

@ -74,10 +74,10 @@ export default definePlugin({
// This prevents the Message Requests tab from always hiding due to the previous patch (and is compatible with spam requests)
// In short, only the red badge is hidden. Button visibility behavior isn't changed.
{
find: ".getSpamChannelsCount()",
find: ".getSpamChannelsCount();return",
predicate: () => settings.store.hideMessageRequestsCount,
replacement: {
match: /(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,
match: /(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/,
replace: "$self.getRealMessageRequestCount()"
}
},