Fix plugins broken by latest Discord update (#3237)

This commit is contained in:
sadan4 2025-02-20 23:18:57 -05:00 committed by GitHub
parent 3e524f9d92
commit b5ef858e71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 98 additions and 37 deletions

View file

@ -204,7 +204,7 @@ export default definePlugin({
{
// Hide unreads
predicate: () => settings.store.hideUnreads === true,
match: /{channel:(\i),name:\i,.+?unread:(\i).+?;/,
match: /\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,.+?unread:(\i).+?)/,
replace: (m, channel, unread) => `${m}${unread}=$self.isHiddenChannel(${channel})?false:${unread};`
}
]
@ -485,7 +485,7 @@ export default definePlugin({
}
},
{
find: '="NowPlayingViewStore",',
find: '"NowPlayingViewStore"',
replacement: {
// Make active now voice states on hidden channels
match: /(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,