Add UserProfileBadge Back For Comp

This commit is contained in:
thororen1234 2025-08-30 11:15:51 -04:00
parent 1601db0339
commit 2c7de5ff7f
No known key found for this signature in database
2 changed files with 9 additions and 0 deletions

View file

@ -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");

View file

@ -171,6 +171,7 @@ export interface PluginDef {
*/
managedStyle?: string;
userProfileBadge?: ProfileBadge;
userProfileBadges?: ProfileBadge[];
onMessageClick?: MessageClickListener;