From a9cc702956f20f8006782a8d2d3252a6748618f0 Mon Sep 17 00:00:00 2001 From: Beef Date: Tue, 17 Jan 2023 08:01:53 +0000 Subject: [PATCH] [Metro] Hoist Discord's constants --- src/lib/metro/common.ts | 2 +- src/lib/metro/hoist.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/metro/common.ts b/src/lib/metro/common.ts index 5130691..3d26334 100644 --- a/src/lib/metro/common.ts +++ b/src/lib/metro/common.ts @@ -1,7 +1,7 @@ import { find, findByProps } from "@metro/filters"; // Discord -export const constants = findByProps("API_HOST"); +export { constants } from "@metro/hoist"; export const channels = findByProps("getVoiceChannelId"); export const i18n = findByProps("Messages"); export const url = findByProps("openURL"); diff --git a/src/lib/metro/hoist.ts b/src/lib/metro/hoist.ts index 3b985ca..71b3019 100644 --- a/src/lib/metro/hoist.ts +++ b/src/lib/metro/hoist.ts @@ -10,5 +10,8 @@ window.React = basicFind("createElement") as typeof import("react");; // Export ReactNative export const ReactNative = basicFind("Text") as typeof import("react-native"); +// Export Discord's constants +export const constants = basicFind("ThemeColorMap"); + // Export moment -export const moment = basicFind("isMoment"); \ No newline at end of file +export const moment = basicFind("isMoment");