From 21fd2eae888fd4e748626aa3fe117a49f5020b0b Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 23 Jan 2026 19:14:25 +0100 Subject: [PATCH] fix various webpack finds --- src/plugins/decor/ui/components/SectionedGridList.tsx | 4 ++-- src/plugins/permissionsViewer/index.tsx | 5 ++--- src/plugins/pinDms/index.tsx | 4 ++-- src/plugins/replyTimestamp/index.tsx | 4 ++-- src/plugins/revealAllSpoilers/index.ts | 6 +++--- src/plugins/reviewDB/components/MessageButton.tsx | 4 ++-- src/plugins/serverInfo/GuildInfoModal.tsx | 4 ++-- .../components/HiddenChannelLockScreen.tsx | 5 ++--- src/plugins/userMessagesPronouns/PronounsChatComponent.tsx | 6 +++--- src/plugins/userVoiceShow/components.tsx | 7 ++----- src/plugins/voiceMessages/index.tsx | 4 ++-- src/plugins/whoReacted/index.tsx | 2 -- 12 files changed, 24 insertions(+), 31 deletions(-) diff --git a/src/plugins/decor/ui/components/SectionedGridList.tsx b/src/plugins/decor/ui/components/SectionedGridList.tsx index 4352faddc..0cee5727b 100644 --- a/src/plugins/decor/ui/components/SectionedGridList.tsx +++ b/src/plugins/decor/ui/components/SectionedGridList.tsx @@ -6,13 +6,13 @@ import { cl } from "@plugins/decor/ui"; import { classes } from "@utils/misc"; -import { findByPropsLazy } from "@webpack"; +import { findCssClasses } from "@webpack"; import { React } from "@webpack/common"; import { JSX } from "react"; import Grid, { GridProps } from "./Grid"; -const ScrollerClasses = findByPropsLazy("managedReactiveScroller"); +const ScrollerClasses = findCssClasses("managedReactiveScroller", "thin"); type Section = SectionT & { items: Array; diff --git a/src/plugins/permissionsViewer/index.tsx b/src/plugins/permissionsViewer/index.tsx index bcf9e55b4..37e68a5f1 100644 --- a/src/plugins/permissionsViewer/index.tsx +++ b/src/plugins/permissionsViewer/index.tsx @@ -27,15 +27,14 @@ import { Devs } from "@utils/constants"; import { classes } from "@utils/misc"; import definePlugin, { OptionType } from "@utils/types"; import type { Guild } from "@vencord/discord-types"; -import { findByPropsLazy } from "@webpack"; +import { findCssClassesLazy } from "@webpack"; import { Button, ChannelStore, Dialog, GuildMemberStore, GuildRoleStore, GuildStore, match, Menu, PermissionsBits, Popout, useRef, UserStore } from "@webpack/common"; import openRolesAndUsersPermissionsModal, { PermissionType, RoleOrUserPermission } from "./components/RolesAndUsersPermissions"; import UserPermissions from "./components/UserPermissions"; import { getSortedRolesForMember, sortPermissionOverwrites } from "./utils"; -const PopoutClasses = findByPropsLazy("container", "scroller", "list"); -const RoleButtonClasses = findByPropsLazy("button", "icon"); +const PopoutClasses = findCssClassesLazy("container", "scroller", "list"); export const enum PermissionsSortOrder { HighestRole, diff --git a/src/plugins/pinDms/index.tsx b/src/plugins/pinDms/index.tsx index 53524257d..892406bb7 100644 --- a/src/plugins/pinDms/index.tsx +++ b/src/plugins/pinDms/index.tsx @@ -12,7 +12,7 @@ import { Devs } from "@utils/constants"; import { classes } from "@utils/misc"; import definePlugin, { OptionType, StartAt } from "@utils/types"; import { Channel } from "@vencord/discord-types"; -import { findByPropsLazy, findStoreLazy } from "@webpack"; +import { findCssClassesLazy, findStoreLazy } from "@webpack"; import { Clickable, ContextMenuApi, FluxDispatcher, Menu, React } from "@webpack/common"; import { contextMenus } from "./components/contextMenu"; @@ -26,7 +26,7 @@ interface ChannelComponentProps { selected: boolean; } -const headerClasses = findByPropsLazy("privateChannelsHeaderContainer"); +const headerClasses = findCssClassesLazy("privateChannelsHeaderContainer", "headerText"); export const PrivateChannelSortStore = findStoreLazy("PrivateChannelSortStore") as { getPrivateChannelIds: () => string[]; }; diff --git a/src/plugins/replyTimestamp/index.tsx b/src/plugins/replyTimestamp/index.tsx index dcf70c706..7391153b8 100644 --- a/src/plugins/replyTimestamp/index.tsx +++ b/src/plugins/replyTimestamp/index.tsx @@ -10,11 +10,11 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; import type { Message } from "@vencord/discord-types"; -import { findByPropsLazy } from "@webpack"; +import { findCssClassesLazy } from "@webpack"; import { DateUtils, Timestamp } from "@webpack/common"; import type { HTMLAttributes } from "react"; -const MessageClasses = findByPropsLazy("separator", "latin24CompactTimeStamp"); +const MessageClasses = findCssClassesLazy("separator", "latin24CompactTimeStamp"); function Sep(props: HTMLAttributes) { return ; diff --git a/src/plugins/revealAllSpoilers/index.ts b/src/plugins/revealAllSpoilers/index.ts index ad1d89f96..814abb202 100644 --- a/src/plugins/revealAllSpoilers/index.ts +++ b/src/plugins/revealAllSpoilers/index.ts @@ -18,10 +18,10 @@ import { Devs, IS_MAC } from "@utils/constants"; import definePlugin from "@utils/types"; -import { findByPropsLazy } from "@webpack"; +import { findCssClassesLazy } from "@webpack"; -const SpoilerClasses = findByPropsLazy("spoilerContent"); -const MessagesClasses = findByPropsLazy("messagesWrapper", "navigationDescription"); +const SpoilerClasses = findCssClassesLazy("spoilerContent", "hidden"); +const MessagesClasses = findCssClassesLazy("messagesWrapper", "navigationDescription"); export default definePlugin({ name: "RevealAllSpoilers", diff --git a/src/plugins/reviewDB/components/MessageButton.tsx b/src/plugins/reviewDB/components/MessageButton.tsx index 9b0b4be1a..10c92db85 100644 --- a/src/plugins/reviewDB/components/MessageButton.tsx +++ b/src/plugins/reviewDB/components/MessageButton.tsx @@ -18,10 +18,10 @@ import { DeleteIcon } from "@components/Icons"; import { classes } from "@utils/misc"; -import { findByPropsLazy } from "@webpack"; +import { findCssClassesLazy } from "@webpack"; import { Tooltip } from "@webpack/common"; -const iconClasses = findByPropsLazy("button", "wrapper", "disabled", "separator"); +const iconClasses = findCssClassesLazy("button", "wrapper", "disabled", "separator", "dangerous"); export function DeleteButton({ onClick }: { onClick(): void; }) { return ( diff --git a/src/plugins/serverInfo/GuildInfoModal.tsx b/src/plugins/serverInfo/GuildInfoModal.tsx index 0ed5548c9..5e3a23a7d 100644 --- a/src/plugins/serverInfo/GuildInfoModal.tsx +++ b/src/plugins/serverInfo/GuildInfoModal.tsx @@ -12,10 +12,10 @@ import { classes } from "@utils/misc"; import { ModalRoot, ModalSize, openModal } from "@utils/modal"; import { useAwaiter } from "@utils/react"; import { Guild, User } from "@vencord/discord-types"; -import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; +import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; import { FluxDispatcher, Forms, GuildChannelStore, GuildMemberStore, GuildRoleStore, IconUtils, Parser, PresenceStore, RelationshipStore, ScrollerThin, SnowflakeUtils, TabBar, Timestamp, useEffect, UserStore, UserUtils, useState, useStateFromStores } from "@webpack/common"; -const IconClasses = findByPropsLazy("icon", "acronym", "childWrapper"); +const IconClasses = findCssClassesLazy("icon", "acronym", "childWrapper"); const FriendRow = findComponentByCodeLazy("discriminatorClass:", ".isMobileOnline", "getAvatarURL"); const cl = classNameFactory("vc-gp-"); diff --git a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx index 7dec55ac6..bb7a361fe 100644 --- a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx +++ b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx @@ -25,7 +25,7 @@ import { sortPermissionOverwrites } from "@plugins/permissionsViewer/utils"; import { classes } from "@utils/misc"; import { formatDuration } from "@utils/text"; import type { Channel } from "@vencord/discord-types"; -import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; +import { findByPropsLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; import { EmojiStore, FluxDispatcher, GuildMemberStore, GuildStore, Parser, PermissionsBits, PermissionStore, SnowflakeUtils, Text, Timestamp, Tooltip, useEffect, useState } from "@webpack/common"; import { cl, settings } from ".."; @@ -81,8 +81,7 @@ const enum ChannelFlags { } -const ChatScrollClasses = findByPropsLazy("auto", "managedReactiveScroller"); -const ChatClasses = findByPropsLazy("chat", "content", "noChat", "chatContent"); +const ChatScrollClasses = findCssClassesLazy("auto", "managedReactiveScroller", "customTheme"); const ChannelBeginHeader = findComponentByCodeLazy("#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}"); const TagComponent = findComponentByCodeLazy("#{intl::FORUM_TAG_A11Y_FILTER_BY_TAG}"); diff --git a/src/plugins/userMessagesPronouns/PronounsChatComponent.tsx b/src/plugins/userMessagesPronouns/PronounsChatComponent.tsx index b4c326389..4c380e93c 100644 --- a/src/plugins/userMessagesPronouns/PronounsChatComponent.tsx +++ b/src/plugins/userMessagesPronouns/PronounsChatComponent.tsx @@ -21,13 +21,13 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { getIntlMessage } from "@utils/discord"; import { classes } from "@utils/misc"; import { Message } from "@vencord/discord-types"; -import { findByPropsLazy } from "@webpack"; +import { findCssClassesLazy } from "@webpack"; import { Tooltip, UserStore } from "@webpack/common"; import { settings } from "./settings"; import { useFormattedPronouns } from "./utils"; -const styles: Record = findByPropsLazy("timestampInline"); +const TimestampClasses = findCssClassesLazy("timestampInline", "timestamp"); const MessageDisplayCompact = getUserSettingLazy("textAndImages", "messageDisplayCompact")!; const AUTO_MODERATION_ACTION = 24; @@ -49,7 +49,7 @@ function PronounsChatComponent({ message }: { message: Message; }) { {tooltipProps => ( • {pronouns} )} diff --git a/src/plugins/userVoiceShow/components.tsx b/src/plugins/userVoiceShow/components.tsx index 342014456..71c7e9b08 100644 --- a/src/plugins/userVoiceShow/components.tsx +++ b/src/plugins/userVoiceShow/components.tsx @@ -10,18 +10,15 @@ import ShowHiddenChannelsPlugin from "@plugins/showHiddenChannels"; import { classNameFactory } from "@utils/css"; import { classes } from "@utils/misc"; import { Channel } from "@vencord/discord-types"; -import { filters, findByPropsLazy, mapMangledModuleLazy } from "@webpack"; +import { findByPropsLazy, findCssClassesLazy } from "@webpack"; import { ChannelRouter, ChannelStore, Parser, PermissionsBits, PermissionStore, React, showToast, Text, Toasts, Tooltip, useMemo, UserStore, UserSummaryItem, useStateFromStores, VoiceStateStore } from "@webpack/common"; import { PropsWithChildren } from "react"; const cl = classNameFactory("vc-uvs-"); const { selectVoiceChannel } = findByPropsLazy("selectVoiceChannel", "selectChannel"); -const { useChannelName } = mapMangledModuleLazy("#{intl::GROUP_DM_ALONE}", { - useChannelName: filters.byCode("()=>null==") -}); -const ActionButtonClasses = findByPropsLazy("actionButton", "highlight"); +const ActionButtonClasses = findCssClassesLazy("actionButton", "highlight"); type IconProps = Omit, "children"> & { size?: number; diff --git a/src/plugins/voiceMessages/index.tsx b/src/plugins/voiceMessages/index.tsx index 886ada857..5528aa6f9 100644 --- a/src/plugins/voiceMessages/index.tsx +++ b/src/plugins/voiceMessages/index.tsx @@ -32,7 +32,7 @@ import definePlugin from "@utils/types"; import { chooseFile } from "@utils/web"; import { CloudUpload as TCloudUpload } from "@vencord/discord-types"; import { CloudUploadPlatform } from "@vencord/discord-types/enums"; -import { findByPropsLazy, findLazy, findStoreLazy } from "@webpack"; +import { findCssClassesLazy, findLazy, findStoreLazy } from "@webpack"; import { Button, Constants, FluxDispatcher, Forms, lodash, Menu, MessageActions, PermissionsBits, PermissionStore, RestAPI, SelectedChannelStore, showToast, SnowflakeUtils, Toasts, useEffect, useState } from "@webpack/common"; import { ComponentType } from "react"; @@ -43,7 +43,7 @@ import { VoiceRecorderWeb } from "./WebRecorder"; const CloudUpload: typeof TCloudUpload = findLazy(m => m.prototype?.trackUploadFinished); const PendingReplyStore = findStoreLazy("PendingReplyStore"); -const OptionClasses = findByPropsLazy("optionName", "optionIcon", "optionLabel"); +const OptionClasses = findCssClassesLazy("optionName", "optionIcon", "optionLabel"); export const cl = classNameFactory("vc-vmsg-"); export type VoiceRecorder = ComponentType<{ diff --git a/src/plugins/whoReacted/index.tsx b/src/plugins/whoReacted/index.tsx index fa9bfab53..723301164 100644 --- a/src/plugins/whoReacted/index.tsx +++ b/src/plugins/whoReacted/index.tsx @@ -23,10 +23,8 @@ import { Queue } from "@utils/Queue"; import { useForceUpdater } from "@utils/react"; import definePlugin from "@utils/types"; import { CustomEmoji, Message, ReactionEmoji, User } from "@vencord/discord-types"; -import { findByPropsLazy } from "@webpack"; import { ChannelStore, Constants, FluxDispatcher, React, RestAPI, useEffect, useLayoutEffect, UserStore, UserSummaryItem } from "@webpack/common"; -const AvatarStyles = findByPropsLazy("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar"); let Scroll: any = null; const queue = new Queue(); let reactions: Record;