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;