fix overriding avatars in guilds

This commit is contained in:
Vendicated 2024-07-03 18:07:11 +02:00
parent 3a7499644e
commit f4572d0377
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -51,8 +51,8 @@ export default definePlugin({
replace: "$& && !$self.shouldIgnoreGuildAvatar(this)"
},
{
match: /(?<=:)\i\.\i\.getUserAvatarURL\(this/,
replace: "$self.getAvatarUrl(this)||$&"
match: /(?<=null!=(\i))\?(\i\.\i\.getGuildMemberAvatarURLSimple.+?):(?=\i\.\i\.getUserAvatarURL\(this)/,
replace: "&& this.hasAvatarForGuild?.($1) ? $2 : $self.getAvatarUrl(this)||"
}
]
},