From 4d07735245d37fc0244a0ee3bc4c80865ad48563 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 1 May 2026 09:44:08 -0400 Subject: [PATCH] Decor: Revert patch change --- src/plugins/decor/index.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/plugins/decor/index.tsx b/src/plugins/decor/index.tsx index 03f468b23..6bb5eb097 100644 --- a/src/plugins/decor/index.tsx +++ b/src/plugins/decor/index.tsx @@ -111,10 +111,16 @@ export default definePlugin({ // Patch avatar decoration preview to display Decor avatar decorations as if they are purchased { find: "#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}", - replacement: { - match: /(?<==)\i=>{let{user:\i,guildId:\i,avatarDecoration:/, - replace: "$self.AvatarDecorationModalPreview=$&" - } + replacement: [ + { + match: /(#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}.+?return null!=(\i)&&\()(null==\i)/, + replace: (_, rest, avatarDecoration, hasPurchase) => `${rest}(${avatarDecoration}.skuId!==$self.SKU_ID&&${avatarDecoration}.skuId!==$self.RAW_SKU_ID&&${hasPurchase})` + }, + { + match: /(?<==)\i=>{let{user:\i,guildId:\i,avatarDecoration:/, + replace: "$self.AvatarDecorationModalPreview=$&" + } + ] } ], settings,