mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-23 13:27:03 -04:00
Suncord EOL
This commit is contained in:
parent
0c97ef7e44
commit
f2404df3af
9 changed files with 7 additions and 202 deletions
|
@ -39,7 +39,7 @@ interface BadgeCache {
|
|||
let badgeImages;
|
||||
|
||||
// const API_URL = "https://clientmodbadges-api.herokuapp.com/";
|
||||
const API_URL = "https://globalbadges.suncord.rest/";
|
||||
const API_URL = "https://globalbadges.equicord.fyi/";
|
||||
|
||||
const cache = new Map<string, BadgeCache>();
|
||||
const EXPIRES = 1000 * 60 * 15;
|
||||
|
@ -88,7 +88,6 @@ const GlobalBadges = ({ userId }: { userId: string; }) => {
|
|||
Object.keys(badges).forEach(mod => {
|
||||
if (mod.toLowerCase() === "vencord") return;
|
||||
if (mod.toLowerCase() === "equicord") return;
|
||||
if (mod.toLowerCase() === "suncord") return;
|
||||
badges[mod].forEach(badge => {
|
||||
if (typeof badge === "string") {
|
||||
const fullNames = { "hunter": "Bug Hunter", "early": "Early User" };
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { addDecoration, removeDecoration } from "@api/MessageDecorations";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { isEquicordPluginDev, isPluginDev, isSuncordPluginDev } from "@utils/misc";
|
||||
import { isEquicordPluginDev, isPluginDev } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
|
||||
import badges from "plugins/_api/badges";
|
||||
|
@ -60,30 +60,6 @@ function CheckBadge({ badge, author }: { badge: string; author: User; }): JSX.El
|
|||
/>
|
||||
</span>
|
||||
) : null;
|
||||
case "SuncordDonor":
|
||||
return (
|
||||
<span style={{ order: settings.store.SuncordDonorPosition }}>
|
||||
{badges.getSuncordDonorBadges(author.id)?.map((badge: any) => (
|
||||
<RoleIconComponent
|
||||
className={roleIconClassName}
|
||||
name={badge.description}
|
||||
size={20}
|
||||
src={badge.image}
|
||||
/>
|
||||
))}
|
||||
</span>
|
||||
);
|
||||
case "SuncordContributer":
|
||||
return isSuncordPluginDev(author.id) ? (
|
||||
<span style={{ order: settings.store.SuncordContributorPosition }}>
|
||||
<RoleIconComponent
|
||||
className={roleIconClassName}
|
||||
name={"Suncord Contributor"}
|
||||
size={20}
|
||||
src={"https://raw.githubusercontent.com/verticalsync/Suncord/main/src/assets/icon.png"}
|
||||
/>
|
||||
</span>
|
||||
) : null;
|
||||
case "VencordDonor":
|
||||
return (
|
||||
<span style={{ order: settings.store.VencordDonorPosition }}>
|
||||
|
@ -150,8 +126,6 @@ function ChatBadges({ author }: { author: User; }) {
|
|||
<span className="vc-sbic-badge-row" style={{ margin: "2px" }}>
|
||||
{settings.store.showEquicordDonor && <CheckBadge badge={"EquicordDonor"} author={author} />}
|
||||
{settings.store.showEquicordContributor && <CheckBadge badge={"EquicordContributer"} author={author} />}
|
||||
{settings.store.showSuncordDonor && <CheckBadge badge={"SuncordDonor"} author={author} />}
|
||||
{settings.store.showSuncordContributor && <CheckBadge badge={"SuncordContributer"} author={author} />}
|
||||
{settings.store.showVencordDonor && <CheckBadge badge={"VencordDonor"} author={author} />}
|
||||
{settings.store.showVencordContributor && <CheckBadge badge={"VencordContributer"} author={author} />}
|
||||
{settings.store.showDiscordProfile && <CheckBadge badge={"DiscordProfile"} author={author} />}
|
||||
|
|
|
@ -33,30 +33,6 @@ const settings = definePluginSettings({
|
|||
hidden: true,
|
||||
default: 1
|
||||
},
|
||||
showSuncordDonor: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Enable to show Suncord Donor badges in chat.",
|
||||
hidden: true,
|
||||
default: true
|
||||
},
|
||||
SuncordDonorPosition: {
|
||||
type: OptionType.NUMBER,
|
||||
description: "The position of the Suncord Donor badges.",
|
||||
hidden: true,
|
||||
default: 2
|
||||
},
|
||||
showSuncordContributor: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Enable to show Suncord Contributor badges in chat.",
|
||||
hidden: true,
|
||||
default: true
|
||||
},
|
||||
SuncordContributorPosition: {
|
||||
type: OptionType.NUMBER,
|
||||
description: "The position of the Suncord Contributor badge.",
|
||||
hidden: true,
|
||||
default: 3
|
||||
},
|
||||
showVencordDonor: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Enable to show Vencord donor badges in chat.",
|
||||
|
@ -118,8 +94,6 @@ const BadgeSettings = () => {
|
|||
const [images, setImages] = useState([
|
||||
{ src: "https://i.imgur.com/KsxHlbD.png", shown: settings.store.showEquicordDonor, title: "Equicord donor badges", key: "EquicordDonor", position: settings.store.EquicordDonorPosition },
|
||||
{ src: "https://i.imgur.com/rJDRtUB.png", shown: settings.store.showEquicordContributor, title: "Equicord contributor badge", key: "EquicordContributer", position: settings.store.EquicordContributorPosition },
|
||||
{ src: "https://i.imgur.com/H3GPhpd.png", shown: settings.store.showSuncordDonor, title: "Suncord donor badges", key: "SuncordDonor", position: settings.store.SuncordDonorPosition },
|
||||
{ src: "https://raw.githubusercontent.com/verticalsync/Suncord/main/src/assets/icon.png", shown: settings.store.showSuncordContributor, title: "Suncord contributor badge", key: "SuncordContributer", position: settings.store.SuncordContributorPosition },
|
||||
{ src: "https://cdn.discordapp.com/emojis/1026533070955872337.png", shown: settings.store.showVencordDonor, title: "Vencord donor badges", key: "VencordDonor", position: settings.store.VencordDonorPosition },
|
||||
{ src: "https://vencord.dev/assets/favicon.png", shown: settings.store.showVencordContributor, title: "Vencord contributor badge", key: "VencordContributer", position: settings.store.VencordContributorPosition },
|
||||
{ src: "https://cdn.discordapp.com/badge-icons/bf01d1073931f921909045f3a39fd264.png", shown: settings.store.showDiscordProfile, title: "Discord profile badges (HypeSquad, Discord Staff, Active Developer, etc.)", key: "DiscordProfile", position: settings.store.DiscordProfilePosition },
|
||||
|
@ -137,14 +111,6 @@ const BadgeSettings = () => {
|
|||
settings.store.EquicordContributorPosition = image.position;
|
||||
settings.store.showEquicordContributor = image.shown;
|
||||
break;
|
||||
case "SuncordDonor":
|
||||
settings.store.SuncordDonorPosition = image.position;
|
||||
settings.store.showSuncordDonor = image.shown;
|
||||
break;
|
||||
case "SuncordContributer":
|
||||
settings.store.SuncordContributorPosition = image.position;
|
||||
settings.store.showSuncordContributor = image.shown;
|
||||
break;
|
||||
case "VencordDonor":
|
||||
settings.store.VencordDonorPosition = image.position;
|
||||
settings.store.showVencordDonor = image.shown;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue