From 557ff6085a848f705fd8f6653101ee1ad1d02a51 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 28 Aug 2025 13:37:47 -0400 Subject: [PATCH 1/9] Fix MutualGroupDMs Patch --- src/plugins/mutualGroupDMs/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/mutualGroupDMs/index.tsx b/src/plugins/mutualGroupDMs/index.tsx index 8d81e43db..0d350a8d7 100644 --- a/src/plugins/mutualGroupDMs/index.tsx +++ b/src/plugins/mutualGroupDMs/index.tsx @@ -109,14 +109,14 @@ export default definePlugin({ }, // User Profile Modal v2 { - find: ".tabBarPanel,children:", + find: ".WIDGETS?(", replacement: [ { match: /items:(\i),.+?(?=return\(0,\i\.jsxs?\)\("div)/, replace: "$&$self.pushSection($1,arguments[0].user);" }, { - match: /\.tabBarPanel,children:(?=.+?section:(\i))/, + match: /(?:\.tabBarPanel|\.WIDGETS\}\)),children:(?=.+?section:(\i))/, replace: "$&$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):" }, // Make the gap between each item smaller so our tab can fit. From 6f3cda2cb19fe1caf55c1e76eacd88df3cf84d23 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 28 Aug 2025 21:18:57 -0400 Subject: [PATCH 2/9] Patch Fixes --- src/equicordplugins/downloadify/index.tsx | 4 ++-- src/plugins/showHiddenChannels/index.tsx | 2 +- src/plugins/showMeYourName/index.tsx | 26 +++++++++++------------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/equicordplugins/downloadify/index.tsx b/src/equicordplugins/downloadify/index.tsx index 7a09fc6c4..09205532a 100644 --- a/src/equicordplugins/downloadify/index.tsx +++ b/src/equicordplugins/downloadify/index.tsx @@ -91,8 +91,8 @@ export default definePlugin({ replacement: [ { // Make use of the download function. - match: /(let{item:\i}=(\i).{0,450}?)(await \i.\i.saveImage\(\i,\i.contentType,\i.\i\)),/, - replace: "$1await $self.handleExpandedModalDownloadButtonClicked($2,async()=>{$3});", + match: /(let{item:\i}=(\i).{0,450}?)(let \i=)(await \i.\i.saveImage\(\i,\i.contentType,\i.\i\))/, + replace: "$1await $self.handleExpandedModalDownloadButtonClicked($2,async()=>{$4});$3$4", }, { // Disable default success toast. diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 755aa4530..e6acc0994 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -264,7 +264,7 @@ export default definePlugin({ replace: (m, channel) => `${m}if($self.isHiddenChannel(${channel}))break;` }, { - match: /(?<="renderHeaderBar",\i=>{.+?hideSearch:(\i)\.isDirectory\(\))/, + match: /(?<="renderHeaderBar",\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/, replace: (_, channel) => `||$self.isHiddenChannel(${channel})` }, { diff --git a/src/plugins/showMeYourName/index.tsx b/src/plugins/showMeYourName/index.tsx index 5eca3a0b3..cd82c9c4d 100644 --- a/src/plugins/showMeYourName/index.tsx +++ b/src/plugins/showMeYourName/index.tsx @@ -768,19 +768,19 @@ export default definePlugin({ patches: [ { find: '="SYSTEM_TAG"', - group: true, - replacement: [ - { - // Replace names in messages and replies. - match: /(onContextMenu:\i,children:)(.{0,250}?),"data-text":(\i\+\i)/, - replace: "$1$self.getMessageNameElement(arguments[0])??($2),\"data-text\":$self.getMessageNameText(arguments[0])??($3)" - }, - { - // Animate gradients for message authors. - match: /(let{setAnimate:\i}=(\i);)/, - replace: "$1if($2.animate){$self.addHoveringMessage(arguments[0].message.id)}else{$self.removeHoveringMessage(arguments[0].message.id)};" - } - ] + replacement: { + // Replace names in messages and replies. + match: /(onContextMenu:\i,children:)(.{0,250}?),"data-text":(\i\+\i)/, + replace: "$1$self.getMessageNameElement(arguments[0])??($2),\"data-text\":$self.getMessageNameText(arguments[0])??($3)" + } + }, + { + find: /setAnimate.{0,50}\.ANIMATE_CHAT_AVATAR,/, + replacement: { + // Animate gradients for message authors. + match: /(let{setAnimate:\i}=(\i);)/, + replace: "$1if($2.animate){$self.addHoveringMessage(arguments[0].message.id)}else{$self.removeHoveringMessage(arguments[0].message.id)};" + } }, { // Replace names in mentions. From 508dce22eb881a2349b4f770831c8af6fcce6db9 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 28 Aug 2025 22:08:04 -0400 Subject: [PATCH 3/9] Fix Downloadify --- src/equicordplugins/downloadify/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/equicordplugins/downloadify/index.tsx b/src/equicordplugins/downloadify/index.tsx index 09205532a..f27bdf8d4 100644 --- a/src/equicordplugins/downloadify/index.tsx +++ b/src/equicordplugins/downloadify/index.tsx @@ -92,11 +92,15 @@ export default definePlugin({ { // Make use of the download function. match: /(let{item:\i}=(\i).{0,450}?)(let \i=)(await \i.\i.saveImage\(\i,\i.contentType,\i.\i\))/, - replace: "$1await $self.handleExpandedModalDownloadButtonClicked($2,async()=>{$4});$3$4", + replace: "$1await $self.handleExpandedModalDownloadButtonClicked($2,async()=>{$4})", + }, + { + match: /if\(\i===.{0,100}\(\i\)\);/, + replace: "" }, { // Disable default success toast. - match: /(\(0,.{0,85}?ToastType.SUCCESS\)\))/, + match: /\i===\i\.\i\.SAVED&&\(\(0,.{0,85}?ToastType.SUCCESS\)\)\)/, replace: "", }, { From 943c6fe0249af2345496a673aab724074d6d032d Mon Sep 17 00:00:00 2001 From: Etorix <92535668+EtorixDev@users.noreply.github.com> Date: Fri, 29 Aug 2025 06:04:24 -0700 Subject: [PATCH 4/9] Fix patches. (#367) --- src/equicordplugins/downloadify/index.tsx | 10 +++----- src/plugins/showMeYourName/index.tsx | 29 +++++++++++++++-------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/equicordplugins/downloadify/index.tsx b/src/equicordplugins/downloadify/index.tsx index f27bdf8d4..4e612f2f6 100644 --- a/src/equicordplugins/downloadify/index.tsx +++ b/src/equicordplugins/downloadify/index.tsx @@ -91,16 +91,12 @@ export default definePlugin({ replacement: [ { // Make use of the download function. - match: /(let{item:\i}=(\i).{0,450}?)(let \i=)(await \i.\i.saveImage\(\i,\i.contentType,\i.\i\))/, - replace: "$1await $self.handleExpandedModalDownloadButtonClicked($2,async()=>{$4})", - }, - { - match: /if\(\i===.{0,100}\(\i\)\);/, - replace: "" + match: /(let{item:\i}=(\i).{0,450}?)let \i=(await \i.\i.saveImage\(\i,\i.contentType,\i.\i\)).{0,110}?&&/, + replace: "$1await $self.handleExpandedModalDownloadButtonClicked($2,async()=>{$3});", }, { // Disable default success toast. - match: /\i===\i\.\i\.SAVED&&\(\(0,.{0,85}?ToastType.SUCCESS\)\)\)/, + match: /\(\(0,.{0,85}?ToastType.SUCCESS\)\)\)/, replace: "", }, { diff --git a/src/plugins/showMeYourName/index.tsx b/src/plugins/showMeYourName/index.tsx index cd82c9c4d..3700cef94 100644 --- a/src/plugins/showMeYourName/index.tsx +++ b/src/plugins/showMeYourName/index.tsx @@ -768,18 +768,27 @@ export default definePlugin({ patches: [ { find: '="SYSTEM_TAG"', - replacement: { - // Replace names in messages and replies. - match: /(onContextMenu:\i,children:)(.{0,250}?),"data-text":(\i\+\i)/, - replace: "$1$self.getMessageNameElement(arguments[0])??($2),\"data-text\":$self.getMessageNameText(arguments[0])??($3)" - } + group: true, + replacement: [ + { + // Replace names in messages and replies. + match: /(onContextMenu:\i,children:)(.{0,250}?),"data-text":(\i\+\i)/, + replace: "$1$self.getMessageNameElement(arguments[0])??($2),\"data-text\":$self.getMessageNameText(arguments[0])??($3)" + }, + { + // Pass the message object to the should-animate checker. + match: /(\(\{)(shouldSubscribe)/, + replace: "$1message:arguments[0].message,$2" + } + ] }, { find: /setAnimate.{0,50}\.ANIMATE_CHAT_AVATAR,/, replacement: { - // Animate gradients for message authors. + // Track hovering on messages to animate names since Discord's + // built-in hover tracking is buggy. Used by a patch below. match: /(let{setAnimate:\i}=(\i);)/, - replace: "$1if($2.animate){$self.addHoveringMessage(arguments[0].message.id)}else{$self.removeHoveringMessage(arguments[0].message.id)};" + replace: "$1if(arguments[0].message){if($2.animate){$self.addHoveringMessage(arguments[0].message.id)}else{$self.removeHoveringMessage(arguments[0].message.id)}};" } }, { @@ -810,9 +819,9 @@ export default definePlugin({ // Track hovering over second-level messages to animate gradients. // Tack on the groupId, which is how the client groups messages from // the same author together, to the message temporarily so that mentions - // across a group can animate together. By default, Discord handles this - // by animating the second-level message if you are hovering the first-level - // message, but not the other way around. This patch allows both. + // across a group can animate together. By default, Discord handles this, + // but moving between messages can cause a race condition where the animation + // stops on one of the messages in the group. This patch fixes that. find: "CUSTOM_GIFT?\"\":", replacement: { match: /(\(\i,\i,\i\);)(let \i=\i.id===\i(?:.{0,500}?)hovering:(\i))/, From 67aff64fed0422092961f2255691504e92b680e8 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:01:27 -0400 Subject: [PATCH 5/9] MutualGroupDMs: Fix broken patch (#3634) --- src/plugins/mutualGroupDMs/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/mutualGroupDMs/index.tsx b/src/plugins/mutualGroupDMs/index.tsx index 8d81e43db..288899237 100644 --- a/src/plugins/mutualGroupDMs/index.tsx +++ b/src/plugins/mutualGroupDMs/index.tsx @@ -109,14 +109,14 @@ export default definePlugin({ }, // User Profile Modal v2 { - find: ".tabBarPanel,children:", + find: ".tabBarPanel,{[", replacement: [ { match: /items:(\i),.+?(?=return\(0,\i\.jsxs?\)\("div)/, replace: "$&$self.pushSection($1,arguments[0].user);" }, { - match: /\.tabBarPanel,children:(?=.+?section:(\i))/, + match: /\.tabBarPanel,.+?children:(?=.+?section:(\i))/, replace: "$&$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):" }, // Make the gap between each item smaller so our tab can fit. From 1c4055711cd2ea9fc2b718dd298b173f1dfffccc Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:01:45 -0400 Subject: [PATCH 6/9] Fix Tagging --- .github/workflows/publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 28b30bc2f..4117a2065 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,11 @@ on: branches: - main +env: + FORCE_COLOR: true + +permissions: write-all + jobs: release: runs-on: ubuntu-latest From aca30bcb9a37425c4cdecda6f0a5b94a57225112 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:02:45 -0400 Subject: [PATCH 7/9] ShowHiddenChannels: Fix broken patch (#3635) --- src/plugins/showHiddenChannels/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index b4fcd7136..5f83a3f5d 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -239,7 +239,7 @@ export default definePlugin({ replace: (m, channel) => `${m}if($self.isHiddenChannel(${channel}))break;` }, { - match: /(?<="renderHeaderBar",\i=>{.+?hideSearch:(\i)\.isDirectory\(\))/, + match: /(?<="renderHeaderBar",\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/, replace: (_, channel) => `||$self.isHiddenChannel(${channel})` }, { From 8807564053c7b4cc05c763e2dc7171f5d61e39c7 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:23:23 -0300 Subject: [PATCH 8/9] ConsoleJanitor: Fix outdated settings margin --- .../settings/tabs/plugins/components/Common.tsx | 2 +- src/plugins/consoleJanitor/index.tsx | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/settings/tabs/plugins/components/Common.tsx b/src/components/settings/tabs/plugins/components/Common.tsx index 3d84859bf..61c3da529 100644 --- a/src/components/settings/tabs/plugins/components/Common.tsx +++ b/src/components/settings/tabs/plugins/components/Common.tsx @@ -36,7 +36,7 @@ export function resolveError(isValidResult: boolean | string) { interface SettingsSectionProps extends PropsWithChildren { name: string; description: string; - error: string | null; + error?: string | null; inlineSetting?: boolean; } diff --git a/src/plugins/consoleJanitor/index.tsx b/src/plugins/consoleJanitor/index.tsx index 4981ac2ca..fb4117c1e 100644 --- a/src/plugins/consoleJanitor/index.tsx +++ b/src/plugins/consoleJanitor/index.tsx @@ -6,11 +6,10 @@ import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; -import { Flex } from "@components/Flex"; +import { SettingsSection } from "@components/settings/tabs/plugins/components/Common"; import { Devs } from "@utils/constants"; -import { Margins } from "@utils/margins"; import definePlugin, { defineDefault, OptionType, StartAt } from "@utils/types"; -import { Checkbox, Forms, Text } from "@webpack/common"; +import { Checkbox, Text } from "@webpack/common"; const Noop = () => { }; const NoopLogger = { @@ -58,15 +57,13 @@ function AllowLevelSetting({ settingKey }: AllowLevelSettingProps) { const AllowLevelSettings = ErrorBoundary.wrap(() => { return ( - - Filter List - Always allow loggers of these types - + +
{Object.keys(settings.store.allowLevel).map(key => ( ))} - - +
+
); }); From b10b238e05fef78bd3b133809eaea5ee1b093eda Mon Sep 17 00:00:00 2001 From: Etorix <92535668+EtorixDev@users.noreply.github.com> Date: Fri, 29 Aug 2025 14:16:13 -0700 Subject: [PATCH 9/9] Downloadify: Simplify patches. (#369) * Simplify patches. * Simplify patches. --- src/equicordplugins/downloadify/index.tsx | 16 +++------------- .../downloadify/utils/handlers.tsx | 13 +++---------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/equicordplugins/downloadify/index.tsx b/src/equicordplugins/downloadify/index.tsx index 4e612f2f6..3b0fb0618 100644 --- a/src/equicordplugins/downloadify/index.tsx +++ b/src/equicordplugins/downloadify/index.tsx @@ -91,23 +91,13 @@ export default definePlugin({ replacement: [ { // Make use of the download function. - match: /(let{item:\i}=(\i).{0,450}?)let \i=(await \i.\i.saveImage\(\i,\i.contentType,\i.\i\)).{0,110}?&&/, + match: /(let{item:\i}=(\i).{0,450}?)(\i\(!0\);try{.{0,400}?finally{\i\(!1\)})/, replace: "$1await $self.handleExpandedModalDownloadButtonClicked($2,async()=>{$3});", }, - { - // Disable default success toast. - match: /\(\(0,.{0,85}?ToastType.SUCCESS\)\)\)/, - replace: "", - }, - { - // Disable default failure toast. - match: /(\(0,.{0,85}?ToastType.FAILURE\)\))/, - replace: "", - }, { // Prevent videos from opening in browser. - match: /(let{item:\i}=\i.{0,350}?)(SAVE_MEDIA_PRESSED\)).{0,100}?(\i\(!0\);)/, - replace: "$1$2,true){$3" + match: /(let{item:\i}=\i.{0,350}?)(SAVE_MEDIA_PRESSED\)).{0,100}?type\){/, + replace: "$1$2,true){" } ], } diff --git a/src/equicordplugins/downloadify/utils/handlers.tsx b/src/equicordplugins/downloadify/utils/handlers.tsx index 42dd32fc7..43f336578 100644 --- a/src/equicordplugins/downloadify/utils/handlers.tsx +++ b/src/equicordplugins/downloadify/utils/handlers.tsx @@ -677,7 +677,7 @@ export async function handleHoverDownloadButtonClicked(props: HoverDownloadProps if (!originalItem) { // Fallback to default behavior. DownloadifyLogger.info(`[${getFormattedNow()}] [UNRECOGNIZED HOVER DOWNLOAD ITEM]`, props.item); - displayStatus && showToast("File Opened in Browser", Toasts.Type.MESSAGE, { duration: statusDuration * 1000 }); + displayStatus && showToast("Unknown Media Item. Falling Back to Default Behavior", Toasts.Type.MESSAGE, { duration: statusDuration * 1250 }); window.open(downloadUrl, "_blank"); } else { contentType ??= (await DownloadifyNative.queryURL(downloadUrl) || ""); @@ -700,15 +700,8 @@ export async function handleExpandedModalDownloadButtonClicked(props: ExpandedMo if (!url && !original) { // Fallback to default behavior. DownloadifyLogger.info(`[${getFormattedNow()}] [UNRECOGNIZED EXPANDED MODAL DOWNLOAD ITEM]`, props.item); - displayStatus && showToast("Download Started", Toasts.Type.MESSAGE, { duration: statusDuration * 1000 }); - - try { - await fallback(); - displayStatus && showToast("Download Success", Toasts.Type.SUCCESS, { duration: statusDuration * 1000 }); - } catch (error) { - DownloadifyLogger.info(`[${getFormattedNow()}] [FALLBACK DOWNLOAD FAILED]`, error); - displayStatus && showToast("Download Failed", Toasts.Type.FAILURE, { duration: statusDuration * 1000 }); - } + displayStatus && showToast("Unknown Media Item. Falling Back to Default Behavior", Toasts.Type.MESSAGE, { duration: statusDuration * 1250 }); + await fallback(); } else { contentType ??= (await DownloadifyNative.queryURL(url) || ""); let aliasBasename = sourceMetadata?.identifier.title ?? null;