From f68effc7e29ec9b72f9d5f6985f65503917a97ba Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 31 May 2024 05:50:34 -0300 Subject: [PATCH] more robust find --- src/plugins/showTimeoutDuration/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/showTimeoutDuration/index.tsx b/src/plugins/showTimeoutDuration/index.tsx index 1c75b9e83..43456da8f 100644 --- a/src/plugins/showTimeoutDuration/index.tsx +++ b/src/plugins/showTimeoutDuration/index.tsx @@ -10,12 +10,12 @@ import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; -import { findComponent } from "@webpack"; +import { findComponentByCode } from "@webpack"; import { ChannelStore, GuildMemberStore, i18n, Text, Tooltip } from "@webpack/common"; import { Message } from "discord-types/general"; import { FunctionComponent, ReactNode } from "react"; -const CountDown = findComponent(m => m.prototype?.render?.toString().includes(".MAX_AGE_NEVER")); +const CountDown = findComponentByCode(".MAX_AGE_NEVER"); const enum DisplayStyle { Tooltip = "tooltip",