diff options
-rw-r--r-- | src/plugins/betterFolders/FolderSideBar.tsx | 3 | ||||
-rw-r--r-- | src/plugins/mutualGroupDMs.tsx | 2 | ||||
-rw-r--r-- | src/plugins/validUser.tsx | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/betterFolders/FolderSideBar.tsx b/src/plugins/betterFolders/FolderSideBar.tsx index 7159f7e..6353a97 100644 --- a/src/plugins/betterFolders/FolderSideBar.tsx +++ b/src/plugins/betterFolders/FolderSideBar.tsx @@ -36,7 +36,8 @@ function Guilds(props: { // @ts-expect-error const res = Vencord.Plugins.plugins.BetterFolders.Guilds(props); - const scrollerProps = res.props.children?.props?.children?.[1]?.props; + // TODO: Make this better + const scrollerProps = res.props.children?.props?.children?.props?.children?.[1]?.props; if (scrollerProps?.children) { const servers = scrollerProps.children.find(c => c?.props?.["aria-label"] === i18n.Messages.SERVERS); if (servers) scrollerProps.children = servers; diff --git a/src/plugins/mutualGroupDMs.tsx b/src/plugins/mutualGroupDMs.tsx index 6d6dc52..a365813 100644 --- a/src/plugins/mutualGroupDMs.tsx +++ b/src/plugins/mutualGroupDMs.tsx @@ -78,7 +78,7 @@ export default definePlugin({ </Avatar> <div className={ProfileListClasses.listRowContent}> <div className={ProfileListClasses.listName}>{getGroupDMName(c)}</div> - <div className={GuildLabelClasses.guildNick}>{c.recipients.length} Members</div> + <div className={GuildLabelClasses.guildNick}>{c.recipients.length + 1} Members</div> </div> </Clickable> )); diff --git a/src/plugins/validUser.tsx b/src/plugins/validUser.tsx index 42349b4..69e0f13 100644 --- a/src/plugins/validUser.tsx +++ b/src/plugins/validUser.tsx @@ -24,7 +24,7 @@ import definePlugin from "@utils/types"; import { findByCodeLazy } from "@webpack"; import { UserStore, useState } from "@webpack/common"; import type { User } from "discord-types/general"; -import type { ComponentType } from "react"; +import type { ComponentType, ReactNode } from "react"; const fetching = new Set<string>(); const queue = new Queue(5); @@ -36,7 +36,7 @@ interface MentionProps { channelId?: string; content: any; }; - parse: (content: any, props: MentionProps["props"]) => string[]; + parse: (content: any, props: MentionProps["props"]) => ReactNode; props: { key: string; formatInline: boolean; @@ -72,7 +72,7 @@ function MentionWrapper({ data, UserMention, RoleMention, parse, props }: Mentio > <span onMouseEnter={() => { - const mention = children?.[0]; + const mention = children?.[0]?.props?.children; if (typeof mention !== "string") return; const id = mention.match(/<@(\d+)>/)?.[1]; |