From 2c7de5ff7f6ec3d460729be8f072a538d3d3d6f1 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sat, 30 Aug 2025 11:15:51 -0400 Subject: [PATCH] Add UserProfileBadge Back For Comp --- src/plugins/index.ts | 8 ++++++++ src/utils/types.ts | 1 + 2 files changed, 9 insertions(+) diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 53c2cd770..b2b066c49 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -125,6 +125,14 @@ for (const p of pluginsValues) if (isPluginEnabled(p.name)) { dep.isDependency = true; }); + if (p.userProfileBadge) { + if (!p.userProfileBadges) { + p.userProfileBadges = [p.userProfileBadge]; + } else { + p.userProfileBadges = [p.userProfileBadge, ...p.userProfileBadges]; + } + } + if (p.commands?.length) neededApiPlugins.add("CommandsAPI"); if (p.onBeforeMessageEdit || p.onBeforeMessageSend || p.onMessageClick) neededApiPlugins.add("MessageEventsAPI"); if (p.renderChatBarButton) neededApiPlugins.add("ChatInputButtonAPI"); diff --git a/src/utils/types.ts b/src/utils/types.ts index 462686357..0f81d7bdf 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -171,6 +171,7 @@ export interface PluginDef { */ managedStyle?: string; + userProfileBadge?: ProfileBadge; userProfileBadges?: ProfileBadge[]; onMessageClick?: MessageClickListener;