diff --git a/src/equicordplugins/commandPalette/registry.tsx b/src/equicordplugins/commandPalette/registry.tsx index 8c7c87cf9..313dd242c 100644 --- a/src/equicordplugins/commandPalette/registry.tsx +++ b/src/equicordplugins/commandPalette/registry.tsx @@ -15,7 +15,7 @@ import { Logger } from "@utils/Logger"; import type { Plugin } from "@utils/types"; import { changes, checkForUpdates } from "@utils/updater"; import { Guild } from "@vencord/discord-types"; -import { findByPropsLazy, findExportedComponentLazy, findStoreLazy } from "@webpack"; +import { findByPropsLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack"; import { Alerts, ChannelActionCreators, ChannelRouter, ChannelStore, ComponentDispatch, FluxDispatcher, GuildStore, IconUtils, MediaEngineStore, MessageStore, NavigationRouter, React, ReadStateStore, ReadStateUtils, SelectedChannelStore, SelectedGuildStore, SettingsRouter, StreamerModeStore, Toasts, useEffect, UserStore, VoiceActions } from "@webpack/common"; import type { FC, ReactElement, ReactNode } from "react"; @@ -800,7 +800,7 @@ const runtimeCleanupCallbacks: Array<() => void> = []; const NotificationSettingsActionCreators = findByPropsLazy("updateGuildNotificationSettings", "updateChannelOverrideSettings"); const GuildSettingsActions = findByPropsLazy("open", "selectRole", "updateGuild"); const GuildMembershipActions = findByPropsLazy("leaveGuild"); -const HeadphonesIcon = findExportedComponentLazy("HeadphonesIcon"); +const HeadphonesIcon = findComponentByCodeLazy("4.1-2.13h1.86A9"); const UserGuildSettingsStore = findStoreLazy("UserGuildSettingsStore"); const NotificationsInboxStore = findStoreLazy("NotificationsInboxStore") as NotificationsInboxStoreLike; const RecentMentionsStore = findStoreLazy("RecentMentionsStore") as RecentMentionsStoreLike; diff --git a/src/equicordplugins/commandPalette/ui/pages/specs/statusTimerPage.ts b/src/equicordplugins/commandPalette/ui/pages/specs/statusTimerPage.ts index cbf1061eb..a931c0cb7 100644 --- a/src/equicordplugins/commandPalette/ui/pages/specs/statusTimerPage.ts +++ b/src/equicordplugins/commandPalette/ui/pages/specs/statusTimerPage.ts @@ -4,12 +4,11 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -import { findExportedComponentLazy } from "@webpack"; +import { TimerIcon } from "@plugins/callTimer/TimerIcon"; import { cancelScheduledStatusReset, setStatusDndForDuration } from "../../../registry"; import type { PalettePageSpec, PaletteSuggestion } from "../types"; -const TimerIcon = findExportedComponentLazy("TimerIcon"); const DURATION_CHOICES = [ { id: "15", label: "15 minutes", icon: TimerIcon }, { id: "30", label: "30 minutes", icon: TimerIcon }, diff --git a/src/equicordplugins/equicordHelper/index.tsx b/src/equicordplugins/equicordHelper/index.tsx index 074beb5be..eda76d494 100644 --- a/src/equicordplugins/equicordHelper/index.tsx +++ b/src/equicordplugins/equicordHelper/index.tsx @@ -9,12 +9,13 @@ import { HeaderBarButton } from "@api/HeaderBar"; import { addMessagePreSendListener, removeMessagePreSendListener } from "@api/MessageEvents"; import { isPluginEnabled } from "@api/PluginManager"; import { definePluginSettings, migratePluginToSettings, Settings } from "@api/Settings"; +import { WarningIcon } from "@components/Icons"; import customRPC from "@plugins/customRPC"; import { Devs, EquicordDevs, GUILD_ID, SUPPORT_CHANNEL_ID, SUPPORT_CHANNEL_IDS, VC_SUPPORT_CHANNEL_IDS } from "@utils/constants"; import { isAnyPluginDev } from "@utils/misc"; import definePlugin, { OptionType } from "@utils/types"; import { StandingState } from "@vencord/discord-types/enums"; -import { findByCodeLazy, findExportedComponentLazy, findStoreLazy } from "@webpack"; +import { findByCodeLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack"; import { Alerts, ApplicationCommandIndexStore, NavigationRouter, React, SettingsRouter, UserStore, useStateFromStores } from "@webpack/common"; import { ComponentType } from "react"; @@ -29,8 +30,7 @@ let clicked = false; const SafetyHubStore = findStoreLazy("SafetyHubStore"); const fetchSafetyHub: () => Promise = findByCodeLazy("SAFETY_HUB_FETCH_START"); -const WarningIcon = findExportedComponentLazy("WarningIcon"); -const ShieldIcon = findExportedComponentLazy("ShieldIcon"); +const ShieldIcon = findComponentByCodeLazy("0 0 1-1.29-.88c-.36-.33-.7-.73-.88-1.13-.33-."); const StandingConfig: Record; }> = { [StandingState.ALL_GOOD]: { label: "All good!", hoverColor: "var(--status-positive)", Icon: ShieldIcon }, diff --git a/src/equicordplugins/hideMessages/index.tsx b/src/equicordplugins/hideMessages/index.tsx index dd7bf8538..b373a6bbf 100644 --- a/src/equicordplugins/hideMessages/index.tsx +++ b/src/equicordplugins/hideMessages/index.tsx @@ -9,10 +9,10 @@ import { definePluginSettings } from "@api/Settings"; import { EquicordDevs } from "@utils/constants"; import definePlugin, { IconComponent, OptionType } from "@utils/types"; import { Message } from "@vencord/discord-types"; -import { findExportedComponentLazy } from "@webpack"; +import { findComponentByCodeLazy } from "@webpack"; import { ChannelStore, FluxDispatcher, Menu } from "@webpack/common"; -const EyeIconLazy = findExportedComponentLazy("EyeIcon"); +const EyeIconLazy = findComponentByCodeLazy("0-.78-.41l-9.53 6.35c-.42.28-.96.28-1.38"); const EyeIcon: IconComponent = props => ; const hideMessage = (messageId: string, channelId: string) => { diff --git a/src/equicordplugins/holyNotes/index.tsx b/src/equicordplugins/holyNotes/index.tsx index 937f06e14..182a12098 100644 --- a/src/equicordplugins/holyNotes/index.tsx +++ b/src/equicordplugins/holyNotes/index.tsx @@ -27,7 +27,7 @@ import { classNameFactory } from "@utils/css"; import { openModal } from "@utils/modal"; import definePlugin from "@utils/types"; import { Message } from "@vencord/discord-types"; -import { findByCodeLazy, findCssClassesLazy, findExportedComponentLazy } from "@webpack"; +import { findByCodeLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; import { ChannelStore, Menu } from "@webpack/common"; import { NoteModal } from "./components/modals/Notebook"; @@ -35,7 +35,7 @@ import { noteHandler, noteHandlerCache } from "./NoteHandler"; import { DataStoreToCache, HolyNoteStore } from "./utils"; export const cl = classNameFactory("vc-notebook-"); -export const CircleQuestionIcon = findExportedComponentLazy("CircleQuestionIcon"); +export const CircleQuestionIcon = findComponentByCodeLazy("10.58l-3.3-3.3a1"); export const MessageRecord = findByCodeLazy("isEdited(){"); export const messageClasses = findCssClassesLazy("message", "groupStart", "cozyMessage"); export const resultsClasses = findCssClassesLazy("emptyResultsWrap", "emptyResultsContent", "errorImage", "emptyResultsText", "noResultsImage", "alt"); diff --git a/src/equicordplugins/iconViewer/index.tsx b/src/equicordplugins/iconViewer/index.tsx index 6df0d72f1..1b002147d 100644 --- a/src/equicordplugins/iconViewer/index.tsx +++ b/src/equicordplugins/iconViewer/index.tsx @@ -23,6 +23,15 @@ export default definePlugin({ authors: [EquicordDevs.iamme], dependencies: ["Settings"], startAt: StartAt.WebpackReady, + patches: [ + { + find: "AngleBracketsIcon", + replacement: { + match: /SectionDivider:\(\)=>\i,(?=.*?(\i),\{AIcon)/, + replace: "$&icons:()=>$1," + } + } + ], toolboxActions: { "Open Icons Tab"() { SettingsRouter.openUserSettings("equicord_icon_viewer_panel"); diff --git a/src/equicordplugins/messagePeek/index.tsx b/src/equicordplugins/messagePeek/index.tsx index 564838146..1b4fe30cb 100644 --- a/src/equicordplugins/messagePeek/index.tsx +++ b/src/equicordplugins/messagePeek/index.tsx @@ -9,6 +9,7 @@ import "./style.css"; import { DecoratorProps } from "@api/MemberListDecorators"; import { isPluginEnabled } from "@api/PluginManager"; import { definePluginSettings } from "@api/Settings"; +import { ImageIcon, Microphone } from "@components/Icons"; import betterActivities from "@equicordplugins/betterActivities"; import showMeYourName from "@plugins/showMeYourName"; import { Devs, EquicordDevs } from "@utils/constants"; @@ -17,7 +18,7 @@ import { classes } from "@utils/misc"; import definePlugin, { OptionType } from "@utils/types"; import { Activity, ApplicationStream, Channel, Message, OnlineStatus, User } from "@vencord/discord-types"; import { MessageFlags } from "@vencord/discord-types/enums"; -import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy, findCssClassesLazy, findExportedComponentLazy } from "@webpack"; +import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; import { ChannelStore, ExperimentStore, MessageStore, Parser, RelationshipStore, SnowflakeUtils, UserGuildSettingsStore, UserStore, useStateFromStores } from "@webpack/common"; const cl = classNameFactory("vc-message-peek-"); @@ -43,12 +44,12 @@ type AttachmentType = "image" | "gif" | "video" | "file"; type IconType = AttachmentType | "voice" | "sticker"; const Icons: Record> = { - image: findExportedComponentLazy("ImageIcon"), - file: findExportedComponentLazy("AttachmentIcon"), - voice: findExportedComponentLazy("MicrophoneIcon"), - sticker: findExportedComponentLazy("StickerIcon"), - gif: findExportedComponentLazy("GifIcon"), - video: findExportedComponentLazy("VideoIcon"), + image: ImageIcon, + file: findComponentByCodeLazy("9.86 0l.54.55a6.99 6.99"), + voice: Microphone, + sticker: findComponentByCodeLazy("1-.5.5H6a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4Zm.5 8a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM19"), + gif: findComponentByCodeLazy("3.18 0 0 1-1.12-1.35A4.88 4.8"), + video: findComponentByCodeLazy(" 3-3v-2.12a1"), }; const ATTACHMENT_LABELS: Record = { diff --git a/src/equicordplugins/triviaAI/index.tsx b/src/equicordplugins/triviaAI/index.tsx index 2de85c1a9..20c20953b 100644 --- a/src/equicordplugins/triviaAI/index.tsx +++ b/src/equicordplugins/triviaAI/index.tsx @@ -8,13 +8,13 @@ import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/Co import { EquicordDevs } from "@utils/constants"; import definePlugin, { IconComponent } from "@utils/types"; import { Message } from "@vencord/discord-types"; -import { findExportedComponentLazy } from "@webpack"; +import { findComponentByCodeLazy } from "@webpack"; import { ChannelStore, Menu } from "@webpack/common"; import { settings } from "./settings"; import { getPayload, getResponse, handleResponse } from "./utils"; -const RobotIconLazy = findExportedComponentLazy("RobotIcon"); +const RobotIconLazy = findComponentByCodeLazy("14.93-4H15a1 "); const RobotIcon: IconComponent = props => ; const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }: { message: Message; }) => { diff --git a/src/plugins/favEmojiFirst/index.tsx b/src/plugins/favEmojiFirst/index.tsx index 9d6279dbf..e2a7b6251 100644 --- a/src/plugins/favEmojiFirst/index.tsx +++ b/src/plugins/favEmojiFirst/index.tsx @@ -11,6 +11,7 @@ import { DataStore } from "@api/index"; import { definePluginSettings } from "@api/Settings"; import { BaseText } from "@components/BaseText"; import { Button } from "@components/Button"; +import { PencilIcon } from "@components/Icons"; import { Paragraph } from "@components/Paragraph"; import { Devs, EquicordDevs } from "@utils/constants"; import { classNameFactory } from "@utils/css"; @@ -18,7 +19,7 @@ import { Logger } from "@utils/Logger"; import { openModal } from "@utils/modal"; import definePlugin, { OptionType } from "@utils/types"; import { Emoji, Message } from "@vencord/discord-types"; -import { findByPropsLazy, findExportedComponentLazy } from "@webpack"; +import { findByPropsLazy } from "@webpack"; import { EmojiStore, Menu, TextInput, Toasts, useEffect, useState } from "@webpack/common"; import { ClearAliasesConfirmModal } from "./components/modals/ClearAliasesConfirmModal"; @@ -99,7 +100,6 @@ interface MessageContextMenuArgs { const DATA_KEY = "emoji-aliases"; const logger = new Logger("EmojiAlias"); const EmojiQueryService = findByPropsLazy("queryEmojiResults"); -const PencilIcon = findExportedComponentLazy("PencilIcon"); const cl = classNameFactory("vc-emoji-alias-"); let aliasMap: AliasMap = {};