From 5df681a1210a3121821c8d77bbeeed7f24be0006 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 14 Feb 2025 21:35:56 -0500 Subject: [PATCH] Fixes for CustomUserColors --- src/equicordplugins/customUserColors/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/equicordplugins/customUserColors/index.tsx b/src/equicordplugins/customUserColors/index.tsx index bf64d5ce..d9ff6a71 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: /type:\i\.\i\.Types\.REMIX/, replacement: { - match: /style:"username".{0,50}void 0/, - replace: "style:{color:$self.colorIfServer(arguments[0])}" + match: /(username,style):"username".{0,25}void 0/, + replace: "$1:{color:$self.colorIfServer(arguments[0])}" } }, { @@ -108,7 +108,8 @@ export default definePlugin({ }, colorIfServer(a: any): string | undefined { - const roleColor = a.author.colorString; + const roleColor = a.author?.colorString; + if (!roleColor) return; if (a.channel.guild_id && !settings.store.colorInServers) return roleColor;