mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-23 16:49:24 -05:00
Fixes for CustomUserColors
This commit is contained in:
parent
0ba61b1c7a
commit
5df681a121
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue