1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-11 02:16:23 +00:00

MemberListDecoratorAPI: Fix

This commit is contained in:
Vendicated 2023-10-25 16:29:37 +02:00 committed by Luna
parent 490127f6e0
commit e3d7b496d2

View file

@ -25,18 +25,23 @@ export default definePlugin({
authors: [Devs.TheSun, Devs.Ven], authors: [Devs.TheSun, Devs.Ven],
patches: [ patches: [
{ {
find: "lostPermissionTooltipText,", find: ".lostPermission)",
replacement: { replacement: [
match: /decorators:.{0,100}?children:\[(?<=(\i)\.lostPermissionTooltipText.+?)/, {
replace: "$&...Vencord.Api.MemberListDecorators.__getDecorators($1)," match: /let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,
} replace: "$&vencordProps=$1,"
}, {
match: /decorators:.{0,100}?children:\[/,
replace: "$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"
}
]
}, },
{ {
find: "PrivateChannel.renderAvatar", find: "PrivateChannel.renderAvatar",
replacement: [ replacement: [
// props are shadowed by nested props so we have to do this // props are shadowed by nested props so we have to do this
{ {
match: /\i=(\i)\.applicationStream,/, match: /let\{[^}]*applicationStream:\i[^}]*\}=(\i),/,
replace: "$&vencordProps=$1," replace: "$&vencordProps=$1,"
}, },
{ {