feat(GlobalBadges): Update API

This commit is contained in:
thororen 2024-04-18 20:59:49 -04:00
parent d5d8f08988
commit 243f77f935

View file

@ -33,7 +33,8 @@ interface BadgeCache {
expires: number; expires: number;
} }
const API_URL = "https://clientmodbadges-api.herokuapp.com/"; // const API_URL = "https://clientmodbadges-api.herokuapp.com/";
const API_URL = "https://globalbadges.suncord.rest/";
const cache = new Map<string, BadgeCache>(); const cache = new Map<string, BadgeCache>();
const EXPIRES = 1000 * 60 * 15; const EXPIRES = 1000 * 60 * 15;
@ -75,6 +76,7 @@ const GlobalBadges = ({ user }: { user: User; }) => {
Object.keys(badges).forEach(mod => { Object.keys(badges).forEach(mod => {
if (mod.toLowerCase() === "vencord") return; if (mod.toLowerCase() === "vencord") return;
if (mod.toLowerCase() === "equicord") return;
badges[mod].forEach(badge => { badges[mod].forEach(badge => {
if (typeof badge === "string") { if (typeof badge === "string") {
const fullNames = { "hunter": "Bug Hunter", "early": "Early User" }; const fullNames = { "hunter": "Bug Hunter", "early": "Early User" };