diff --git a/src/plugins/statusPresets/index.tsx b/src/plugins/statusPresets/index.tsx index 8998ed143..86cc23da4 100644 --- a/src/plugins/statusPresets/index.tsx +++ b/src/plugins/statusPresets/index.tsx @@ -21,7 +21,7 @@ import { getUserSettingLazy } from "@api/UserSettings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType, StartAt } from "@utils/types"; -import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; +import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy } from "@webpack"; import { Button, Clickable, Icons, Menu, Toasts, useState } from "@webpack/common"; // const { PMenu } = mapMangledModuleLazy("{id:t,label:n,icon:c,hint:_,renderSubmenu:E,...h}", { @@ -39,7 +39,8 @@ const StatusStyles = findByPropsLazy("statusItem"); const statusSettings = getUserSettingLazy("status", "status"); const customStatusSettings = getUserSettingLazy("status", "customStatus"); - +const setStatusFunc = findByCodeLazy(/default\.track\(\i.\i.CUSTOM_STATUS_UPDATED/); +const setStatus = (status: DiscordStatus) => setStatusFunc(status.text, status.emojiInfo, status.clearAfter, { "location": { "section": "Account Panel", "object": "Avatar" } }); interface Emoji { animated: boolean; @@ -64,9 +65,6 @@ const settings = definePluginSettings({ }); -function SetStatus(status: DiscordStatus, sourceAnalyticsContext: any) { - return Vencord.Webpack.wreq(720449).Z(status.text, status.emojiInfo, status.clearAfter, sourceAnalyticsContext); -} const RenderStatusMenuItem = ({ status }) => { @@ -111,7 +109,7 @@ const StatusSubMenuComponent = () => { {Object.values((settings.store.StatusPresets as { [k: string]: DiscordStatus; })).map(status =>