From 98955409433ae8c38243dee36500adbb427ccf74 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 25 Oct 2023 16:29:37 +0200 Subject: [PATCH] MemberListDecoratorAPI: Fix --- src/plugins/_api/memberListDecorators.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/plugins/_api/memberListDecorators.ts b/src/plugins/_api/memberListDecorators.ts index a6d4125d..bf7377e8 100644 --- a/src/plugins/_api/memberListDecorators.ts +++ b/src/plugins/_api/memberListDecorators.ts @@ -25,18 +25,23 @@ export default definePlugin({ authors: [Devs.TheSun, Devs.Ven], patches: [ { - find: "lostPermissionTooltipText,", - replacement: { - match: /decorators:.{0,100}?children:\[(?<=(\i)\.lostPermissionTooltipText.+?)/, - replace: "$&...Vencord.Api.MemberListDecorators.__getDecorators($1)," - } + find: ".lostPermission)", + replacement: [ + { + 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", replacement: [ // props are shadowed by nested props so we have to do this { - match: /\i=(\i)\.applicationStream,/, + match: /let\{[^}]*applicationStream:\i[^}]*\}=(\i),/, replace: "$&vencordProps=$1," }, {