Fix patches for latest Discord update (#3943)

Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
sadan4 2026-01-26 22:51:07 -05:00 committed by GitHub
parent b9640433c8
commit f32b68e373
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 4 deletions

View file

@ -32,9 +32,15 @@ export default definePlugin({
match: /(?<=!1;)\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,
replace: "if(Vencord.Api.Notices.currentNotice)return false;$&"
},
{
match: /(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,
replace: (m, notice) => `if(${notice}?.id=="VencordNotice")return(${notice}=null,Vencord.Api.Notices.nextNotice(),true);${m}`
},
// FIXME(Bundler agressive inline): Remove the non used compability once enough time has passed
{
match: /(?<=function (\i)\(\i\){)return null!=(\i)(?=.+?NOTICE_DISMISS:\1)/,
replace: (m, _, notice) => `if(${notice}?.id=="VencordNotice")return(${notice}=null,Vencord.Api.Notices.nextNotice(),true);${m}`
replace: (m, _, notice) => `if(${notice}?.id=="VencordNotice")return(${notice}=null,Vencord.Api.Notices.nextNotice(),true);${m}`,
noWarn: true
}
]
}

View file

@ -253,7 +253,7 @@ export default definePlugin({
{
find: "#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}",
replacement: {
match: /(\i)&&!\i\|\|\i\?null(?<=return (\i)\.verified.+?)/,
match: /(\i)&&!\i\|\|\i\?null(?<=(\i)\.verified&&.+?)/,
replace: "$self.renderToggleGameActivityButton($2,$1),$&"
}
},

View file

@ -147,7 +147,7 @@ export default definePlugin({
// fix alt+shift+up/down
{
find: ".getFlattenedGuildIds()],",
find: "=()=>!1,ensureChatIsVisible:",
replacement: {
match: /(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,
replace: "$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"

View file

@ -42,6 +42,12 @@ export default definePlugin({
{
find: ",BURST_REACTION_EFFECT_PLAY",
replacement: [
{
// if (inlinedCalculatePlayingCount(a,b) >= limit) return;
match: /(BURST_REACTION_EFFECT_PLAY:\i=>{.+?if\()(\(\(\i,\i\)=>.+?\(\i,\i\))>=5+?(?=\))/,
replace: (_, rest, playingCount) => `${rest}!$self.shouldPlayBurstReaction(${playingCount})`
},
// FIXME(Bundler agressive inline): Remove the non used compability once enough time has passed
{
/*
* var limit = 5
@ -49,7 +55,8 @@ export default definePlugin({
* if (calculatePlayingCount(a,b) >= limit) return;
*/
match: /((\i)=5.+?)if\((.{0,20}?)>=\2\)return;/,
replace: (_, rest, playingCount) => `${rest}if(!$self.shouldPlayBurstReaction(${playingCount}))return;`
replace: (_, rest, playingCount) => `${rest}if(!$self.shouldPlayBurstReaction(${playingCount}))return;`,
noWarn: true
}
]
},