mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-25 01:28:52 -05:00
Fix UsrBG for BannersEverywhere
This commit is contained in:
parent
e80b76c7f3
commit
05df3a51f1
1 changed files with 6 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue