From 05df3a51f10461c80b9ab0248998556017abb1c4 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 27 Sep 2024 13:36:22 -0400 Subject: [PATCH] Fix UsrBG for BannersEverywhere --- src/equicordplugins/bannersEverywhere/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/equicordplugins/bannersEverywhere/index.tsx b/src/equicordplugins/bannersEverywhere/index.tsx index dc345220..51662741 100644 --- a/src/equicordplugins/bannersEverywhere/index.tsx +++ b/src/equicordplugins/bannersEverywhere/index.tsx @@ -15,7 +15,8 @@ import { User } from "discord-types/general"; import style from "./index.css?managed"; interface iUSRBG extends Plugin { - data: { [key: string]: string; }; + userHasBackground(userId: string); + getImageUrl(userId: string): string | null; } const settings = definePluginSettings({ @@ -80,8 +81,10 @@ export default definePlugin({ }, getBanner(userId: string): string | undefined { - if (Vencord.Plugins.isPluginEnabled("USRBG") && (Vencord.Plugins.plugins.USRBG as iUSRBG).data[userId]) { - return (Vencord.Plugins.plugins.USRBG as iUSRBG).data[userId]; + if (Vencord.Plugins.isPluginEnabled("USRBG") && (Vencord.Plugins.plugins.USRBG as iUSRBG).userHasBackground(userId)) { + let banner = (Vencord.Plugins.plugins.USRBG as iUSRBG).getImageUrl(userId); + if (banner === null) banner = ""; + return banner; } const userProfile = UserProfileStore.getUserProfile(userId); if (userProfile?.banner) {