From 94339abefa07fc29754e340b234b9f35315e5c9a Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Thu, 11 Jul 2024 23:25:07 -0400 Subject: [PATCH] Fixes --- src/plugins/friendsSince/index.tsx | 2 +- src/plugins/moreUserTags/index.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx index 717bd754..d3d755ef 100644 --- a/src/plugins/friendsSince/index.tsx +++ b/src/plugins/friendsSince/index.tsx @@ -17,7 +17,7 @@ const container = findByPropsLazy("memberSince"); const getCreatedAtDate = findByCodeLazy('month:"short",day:"numeric"'); const locale = findByPropsLazy("getLocale"); const lastSection = findByPropsLazy("lastSection"); -const section = findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2); +const section = findLazy((m: any) => m.section !== void 0 && Object.values(m).length === 1) || findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2); export default definePlugin({ name: "FriendsSince", diff --git a/src/plugins/moreUserTags/index.tsx b/src/plugins/moreUserTags/index.tsx index 45538fb6..0884791c 100644 --- a/src/plugins/moreUserTags/index.tsx +++ b/src/plugins/moreUserTags/index.tsx @@ -263,10 +263,11 @@ export default definePlugin({ // it's either this or extremely long lookbehind match: /user:\i,nick:\i,/, replace: "$&moreTags_channelId," - }, { - match: /,botType:(\i),(?<=user:(\i).+?)/g, + }, + ...[/,botType:(\i\((\i)\)),/g, /,botType:(\i),(?<=user:(\i).+?)/g].map(match => ({ + match, replace: ",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'})," - } + })), ] }, ],