From 369f0957fa6f4a5167d3e7fd60ac17f75da602fd Mon Sep 17 00:00:00 2001 From: Tharki-God Date: Wed, 10 Jul 2024 13:34:25 +0530 Subject: [PATCH] fix --- src/Components/USRBGButton.tsx | 2 +- src/lib/requiredModules.ts | 3 ++- src/types.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Components/USRBGButton.tsx b/src/Components/USRBGButton.tsx index c587729..d8e6740 100644 --- a/src/Components/USRBGButton.tsx +++ b/src/Components/USRBGButton.tsx @@ -21,7 +21,7 @@ export default () => ( /> )} - text="USRBG Banner" + tooltipText="USRBG Banner" onClick={async (): Promise => { if (UltimateGuildStore.getGuild(USBBG_SERVER_ID)) { FluxDispatcher.dispatch({ type: "LAYER_POP_ALL" }); diff --git a/src/lib/requiredModules.ts b/src/lib/requiredModules.ts index 931bab0..17623bf 100644 --- a/src/lib/requiredModules.ts +++ b/src/lib/requiredModules.ts @@ -91,9 +91,10 @@ Modules.loadModules = async (): Promise => { }); Modules.HeaderButton ??= await webpack - .waitForModule(webpack.filters.bySource('.banner]:"banner"==='), { + .waitForModule(webpack.filters.bySource(".bannerColor,"), { timeout: 10000, }) + .then((mod) => webpack.getFunctionBySource(mod, ".bannerColor,")) .catch(() => { throw new Error("Failed To Find HeaderButton Module"); }); diff --git a/src/types.ts b/src/types.ts index b2aded1..f2b41e6 100644 --- a/src/types.ts +++ b/src/types.ts @@ -167,7 +167,7 @@ export namespace Types { } export type HeaderButton = React.ComponentType<{ icon?: () => React.ReactNode; - text?: string; + tooltipText?: string; onClick?: () => void; variant?: "banner" | "icon" | "text"; }>;