From 330c3cead76ca39787d0f199e3c566e90fb8f5a8 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 17 Aug 2025 17:33:23 -0300 Subject: [PATCH] Fix plugins broken by latest Discord update (#3609) --- src/plugins/_api/notices.ts | 4 ++-- src/plugins/copyStickerLinks/{README.MD => README.md} | 0 src/plugins/customIdle/index.ts | 2 +- src/plugins/greetStickerPicker/index.tsx | 2 +- src/plugins/showAllMessageButtons/index.ts | 6 +++--- src/plugins/showHiddenChannels/index.tsx | 2 +- src/plugins/superReactionTweaks/index.ts | 4 ++-- src/plugins/vencordToolbox/index.tsx | 2 +- src/plugins/webContextMenus.web/index.ts | 4 ---- 9 files changed, 11 insertions(+), 15 deletions(-) rename src/plugins/copyStickerLinks/{README.MD => README.md} (100%) diff --git a/src/plugins/_api/notices.ts b/src/plugins/_api/notices.ts index 89aa1a46..2384a10e 100644 --- a/src/plugins/_api/notices.ts +++ b/src/plugins/_api/notices.ts @@ -33,8 +33,8 @@ export default definePlugin({ replace: "if(Vencord.Api.Notices.currentNotice)return false;$&" }, { - 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}` + match: /(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/, + replace: (m, notice) => `if(${notice}?.id=="VencordNotice")return(${notice}=null,Vencord.Api.Notices.nextNotice(),true);${m}` } ] } diff --git a/src/plugins/copyStickerLinks/README.MD b/src/plugins/copyStickerLinks/README.md similarity index 100% rename from src/plugins/copyStickerLinks/README.MD rename to src/plugins/copyStickerLinks/README.md diff --git a/src/plugins/customIdle/index.ts b/src/plugins/customIdle/index.ts index 9a0a47a2..78f4f9d0 100644 --- a/src/plugins/customIdle/index.ts +++ b/src/plugins/customIdle/index.ts @@ -40,7 +40,7 @@ export default definePlugin({ replace: "$self.getIdleTimeout()||" }, { - match: /Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/, + match: /Math\.min\((\i\*\i\.\i\.\i\.SECOND),\i\.\i\)/, replace: "$1" // Decouple idle from afk (phone notifications will remain at user setting or 10 min maximum) }, { diff --git a/src/plugins/greetStickerPicker/index.tsx b/src/plugins/greetStickerPicker/index.tsx index 4ea1f25d..0cc3e170 100644 --- a/src/plugins/greetStickerPicker/index.tsx +++ b/src/plugins/greetStickerPicker/index.tsx @@ -161,7 +161,7 @@ export default definePlugin({ { find: "#{intl::WELCOME_CTA_LABEL}", replacement: { - match: /innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).+?)/, + match: /className:\i\.welcomeCTA,(?<={channel:\i,message:\i}=(\i).+?)/, replace: "$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1)," } } diff --git a/src/plugins/showAllMessageButtons/index.ts b/src/plugins/showAllMessageButtons/index.ts index 6ac17e5d..aa52d34b 100644 --- a/src/plugins/showAllMessageButtons/index.ts +++ b/src/plugins/showAllMessageButtons/index.ts @@ -28,9 +28,9 @@ export default definePlugin({ { find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}", replacement: { - // isExpanded = isShiftPressed && other conditions... - match: /(?<=(\i)=)\i(?=&&.+?isExpanded:\1)/, - replace: "true" + // isExpanded: isShiftPressed && other conditions... + match: /isExpanded:\i&&(.+?),/, + replace: "isExpanded:$1," } } ] diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 1e5891ce..b4fcd713 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -306,7 +306,7 @@ export default definePlugin({ }, { // Export the channel for the users allowed component patch - match: /maxUsers:\i,users:\i(?<=channel:(\i).+?)/, + match: /maxUsers:\d+?,users:\i(?<=channel:(\i).+?)/, replace: (m, channel) => `${m},shcChannel:${channel}` }, { diff --git a/src/plugins/superReactionTweaks/index.ts b/src/plugins/superReactionTweaks/index.ts index b8aed478..22e7d6f3 100644 --- a/src/plugins/superReactionTweaks/index.ts +++ b/src/plugins/superReactionTweaks/index.ts @@ -42,8 +42,8 @@ export default definePlugin({ { find: ",BURST_REACTION_EFFECT_PLAY", replacement: { - match: /(?<=(\i)=\i=>{.+?)(\i\(\i,\i\))>=\i(?=\).+BURST_REACTION_EFFECT_PLAY:\1)/, - replace: "!$self.shouldPlayBurstReaction($2)" + match: /(BURST_REACTION_EFFECT_PLAY:\i=>{.+?if\()(\(\(\i,\i\)=>.+?\(\i,\i\))>=\d+?(?=\))/, + replace: (_, rest, playingCount) => `${rest}!$self.shouldPlayBurstReaction(${playingCount})` } }, { diff --git a/src/plugins/vencordToolbox/index.tsx b/src/plugins/vencordToolbox/index.tsx index 82cd0284..af9fbc87 100644 --- a/src/plugins/vencordToolbox/index.tsx +++ b/src/plugins/vencordToolbox/index.tsx @@ -142,7 +142,7 @@ export default definePlugin({ { find: ".controlButtonWrapper,", replacement: { - match: /(?<=function (\i).{0,100}\()\i.Fragment,(?=.+?toolbar:\1\(\))/, + match: /(?<=toolbar:function\(.{0,100}\()\i.Fragment,/, replace: "$self.ToolboxFragmentWrapper," } } diff --git a/src/plugins/webContextMenus.web/index.ts b/src/plugins/webContextMenus.web/index.ts index 666e51be..be85e33c 100644 --- a/src/plugins/webContextMenus.web/index.ts +++ b/src/plugins/webContextMenus.web/index.ts @@ -142,10 +142,6 @@ export default definePlugin({ match: /!\i\.isPlatformEmbedded/, replace: "false" }, - { - match: /return\s*?\[.{0,50}?(?=\?\(0,\i\.jsxs?.{0,100}?id:"copy-image")/, - replace: "return [true" - }, { match: /(?<=#{intl::COPY_IMAGE_MENU_ITEM}\),)action:/, replace: "action:()=>$self.copyImage(arguments[0]),oldAction:"