From 2f3bda934e614f0fb767b74a69fa728d53d729d7 Mon Sep 17 00:00:00 2001 From: Cassie <37855219+CodeF53@users.noreply.github.com> Date: Sun, 16 Feb 2025 17:52:54 -0700 Subject: [PATCH] Fix CustomUserColors (#152) * fix the code equicord devs (not discord) broke * Spacing --------- Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com> --- src/equicordplugins/customUserColors/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/equicordplugins/customUserColors/index.tsx b/src/equicordplugins/customUserColors/index.tsx index a463f10ff..6207e05bb 100644 --- a/src/equicordplugins/customUserColors/index.tsx +++ b/src/equicordplugins/customUserColors/index.tsx @@ -85,8 +85,8 @@ export default definePlugin({ // this also affects name headers in chats outside of servers find: ".USERNAME),{", replacement: { - match: /(\i=\{.{0,50})\?\{color:\i\}:void 0/, - replace: "color=$self.colorIfServer(arguments[0]),$1?{color:color}:{color:color}" + match: /style:"username"===.{0,25}void 0/, + replace: "style:{color:$self.colorIfServer(arguments[0])}" } }, { @@ -108,8 +108,7 @@ export default definePlugin({ }, colorIfServer(a: any): string | undefined { - const roleColor = a.author?.colorString; - if (!roleColor) return; + const roleColor = a.author?.colorString ?? "inherit"; if (a.channel.guild_id && !settings.store.colorInServers) return roleColor;