From 834563e31c1762240dcc1f4856b439915a7f654b Mon Sep 17 00:00:00 2001 From: Krystal Date: Tue, 1 Oct 2024 22:36:55 -0400 Subject: [PATCH 1/9] =?UTF-8?q?MORE=20BADGES=20=F0=9F=A6=85=F0=9F=A6=85?= =?UTF-8?q?=F0=9F=94=A5=F0=9F=94=A5=F0=9F=97=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.tsx | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 3 deletions(-) diff --git a/index.tsx b/index.tsx index bbf405d..d9a82fe 100644 --- a/index.tsx +++ b/index.tsx @@ -16,7 +16,10 @@ function isCurrentUser(userId: string) { export default definePlugin({ name: "ClientSideBadges", description: "Adds client-side badges to your profile. Other users can't see them!", - authors: [Devs.nin0dev], + authors: [ + { name: "KrystalSkullOfficial", id: 929208515883569182n }, + Devs.nin0dev, + ], settingsAboutComponent: () => <> Only you can view the badges. No, this can't and won't be changed. You may need to reload Discord after editing your settings for them to apply. @@ -45,7 +48,33 @@ export default definePlugin({ }, goldenBugHunter: { type: OptionType.BOOLEAN - } + }, + // shout out krystalskullofficial + // Nino missed some badges + hypesquadEvents: { + type: OptionType.BOOLEAN + }, + houseOfBravery: { + type: OptionType.BOOLEAN + }, + houseOfBrilliance: { + type: OptionType.BOOLEAN + }, + houseOfBalance: { + type: OptionType.BOOLEAN + }, + discordQuests: { + type: OptionType.BOOLEAN + }, + nitro: { + type: OptionType.BOOLEAN + }, + serverBooster:{ + type: OptionType.BOOLEAN + }, + supportsCommands:{ + type: OptionType.BOOLEAN + }, }), async start() { const NativeBadges: ProfileBadge[] = [ @@ -104,7 +133,65 @@ export default definePlugin({ position: Badges.BadgePosition.END, shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.goldenBugHunter, link: "https://discord.com/settings/premium" - } + }, + // shout out krystalskullofficial + // Nino missed some badges + { + description: "HypeSquad Events", + image: "https://cdn.discordapp.com/badge-icons/bf01d1073931f921909045f3a39fd264.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.hypesquadEvents, + link: "https://support.discord.com/hc/en-us/articles/360035962891-Profile-Badges-101#h_01GM67K5EJ16ZHYZQ5MPRW3JT3" + }, + { + description: "House Of Bravery", + image: "https://cdn.discordapp.com/badge-icons/8a88d63823d8a71cd5e390baa45efa02.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.houseOfBravery, + link: "https://discord.com/settings/hypesquad-online" + }, + { + description: "House Of Briliance", + image: "https://cdn.discordapp.com/badge-icons/011940fd013da3f7fb926e4a1cd2e618.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.houseOfBrilliance, + link: "https://discord.com/settings/hypesquad-online" + }, + { + description: "House Of Balance", + image: "https://cdn.discordapp.com/badge-icons/3aa41de486fa12454c3761e8e223442e.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.houseOfBalance, + link: "https://discord.com/settings/hypesquad-online" + }, + { + description: "Discord Quests", + image: "https://cdn.discordapp.com/badge-icons/7d9ae358c8c5e118768335dbe68b4fb8.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.discordQuests, + link: "https://discord.com/discovery/quests" + }, + { + description: "Discord Nitro", + image: "https://cdn.discordapp.com/badge-icons/2ba85e8026a8614b640c2837bcdfe21b.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.nitro, + link: "https://discord.com/settings/premium" + }, + { + description: "Discord 24months booster", + image: "https://cdn.discordapp.com/badge-icons/ec92202290b48d0879b7413d2dde3bab.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.serverBooster, + link: "https://discord.com/settings/premium" + }, + { + description: "Supports Commands", + image: "https://cdn.discordapp.com/badge-icons/6f9e37f9029ff57aef81db857890005e.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.supportsCommands, + link: "https://discord.com/blog/welcome-to-the-new-era-of-discord-apps?ref=badge" + }, ]; NativeBadges.forEach(b => Badges.addBadge(b)); }, -- 2.45.2 From 8d8a1ef21da5566c2c3924271b48df58eae0ec8c Mon Sep 17 00:00:00 2001 From: Krystal Date: Wed, 2 Oct 2024 00:08:23 -0400 Subject: [PATCH 2/9] added more --- index.tsx | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/index.tsx b/index.tsx index d9a82fe..0d055d5 100644 --- a/index.tsx +++ b/index.tsx @@ -75,6 +75,18 @@ export default definePlugin({ supportsCommands:{ type: OptionType.BOOLEAN }, + premiumApp:{ + type: OptionType.BOOLEAN + }, + usesAutomod:{ + type: OptionType.BOOLEAN + }, + orginallyKnownAs:{ + type: OptionType.BOOLEAN + }, + aClownForATime:{ + type: OptionType.BOOLEAN + }, }), async start() { const NativeBadges: ProfileBadge[] = [ @@ -192,6 +204,36 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.supportsCommands, link: "https://discord.com/blog/welcome-to-the-new-era-of-discord-apps?ref=badge" }, + + { + description: "Premium App", + image: "https://cdn.discordapp.com/badge-icons/d2010c413a8da2208b7e4f35bd8cd4ac.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.premiumApp, + link: "https://discord.com/blog/welcome-to-the-new-era-of-discord-apps?ref=badge" + }, + // these badges dont have a link because they literally dont link anywhere + { + description: "Uses Automod", + image: "https://cdn.discordapp.com/badge-icons/f2459b691ac7453ed6039bbcfaccbfcd.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.usesAutomod, + link: "" + }, + { + description: "Originally know as", + image: "https://cdn.discordapp.com/badge-icons/6de6d34650760ba5551a79732e98ed60.png", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.orginallyKnownAs, + link: "" + }, + { + description: "A clown, for a limited time", + image: "", + position: Badges.BadgePosition.END, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.aClownForATime, + link: "" + }, ]; NativeBadges.forEach(b => Badges.addBadge(b)); }, -- 2.45.2 From 267a9d5ae63290223da5bf730823462573272486 Mon Sep 17 00:00:00 2001 From: Krystal Date: Wed, 2 Oct 2024 00:28:07 -0400 Subject: [PATCH 3/9] i found the badge --- index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.tsx b/index.tsx index 0d055d5..6c9e57b 100644 --- a/index.tsx +++ b/index.tsx @@ -204,7 +204,6 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.supportsCommands, link: "https://discord.com/blog/welcome-to-the-new-era-of-discord-apps?ref=badge" }, - { description: "Premium App", image: "https://cdn.discordapp.com/badge-icons/d2010c413a8da2208b7e4f35bd8cd4ac.png", @@ -229,10 +228,10 @@ export default definePlugin({ }, { description: "A clown, for a limited time", - image: "", + image: "https://discord.com/assets/971cfe4aa5c0582000ea.svg", position: Badges.BadgePosition.END, shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.aClownForATime, - link: "" + link: "https://youtu.be/cc2-4ci4G84" }, ]; NativeBadges.forEach(b => Badges.addBadge(b)); -- 2.45.2 From e01cb7d319f6ac166e4ec3c7e4bdba661772d9c4 Mon Sep 17 00:00:00 2001 From: Krystal Date: Wed, 2 Oct 2024 00:30:28 -0400 Subject: [PATCH 4/9] formatting fix --- index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.tsx b/index.tsx index 6c9e57b..a6ccc6c 100644 --- a/index.tsx +++ b/index.tsx @@ -204,14 +204,14 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.supportsCommands, link: "https://discord.com/blog/welcome-to-the-new-era-of-discord-apps?ref=badge" }, + // these badges dont have a link because they literally dont link anywhere { description: "Premium App", image: "https://cdn.discordapp.com/badge-icons/d2010c413a8da2208b7e4f35bd8cd4ac.png", position: Badges.BadgePosition.END, shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.premiumApp, - link: "https://discord.com/blog/welcome-to-the-new-era-of-discord-apps?ref=badge" + link: "" }, - // these badges dont have a link because they literally dont link anywhere { description: "Uses Automod", image: "https://cdn.discordapp.com/badge-icons/f2459b691ac7453ed6039bbcfaccbfcd.png", -- 2.45.2 From dd5c55cc0c2883d231d0314096c940fed66d54e0 Mon Sep 17 00:00:00 2001 From: Krystal Date: Wed, 2 Oct 2024 00:40:47 -0400 Subject: [PATCH 5/9] Better Name for Badge --- index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.tsx b/index.tsx index a6ccc6c..53733a2 100644 --- a/index.tsx +++ b/index.tsx @@ -81,7 +81,7 @@ export default definePlugin({ usesAutomod:{ type: OptionType.BOOLEAN }, - orginallyKnownAs:{ + legacyUsername:{ type: OptionType.BOOLEAN }, aClownForATime:{ @@ -220,12 +220,13 @@ export default definePlugin({ link: "" }, { - description: "Originally know as", + description: "Legacy Username", image: "https://cdn.discordapp.com/badge-icons/6de6d34650760ba5551a79732e98ed60.png", position: Badges.BadgePosition.END, - shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.orginallyKnownAs, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.legacyUsernames, link: "" }, + // Im linking to a dicord video about lootboxs incase someone doesnt know the context behind this badge { description: "A clown, for a limited time", image: "https://discord.com/assets/971cfe4aa5c0582000ea.svg", -- 2.45.2 From 57275357b587398f67ddb78c56c45024d0cf15ed Mon Sep 17 00:00:00 2001 From: Krystal Date: Wed, 2 Oct 2024 00:48:31 -0400 Subject: [PATCH 6/9] typo --- index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.tsx b/index.tsx index 53733a2..0e1c531 100644 --- a/index.tsx +++ b/index.tsx @@ -223,7 +223,7 @@ export default definePlugin({ description: "Legacy Username", image: "https://cdn.discordapp.com/badge-icons/6de6d34650760ba5551a79732e98ed60.png", position: Badges.BadgePosition.END, - shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.legacyUsernames, + shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.legacyUsername, link: "" }, // Im linking to a dicord video about lootboxs incase someone doesnt know the context behind this badge -- 2.45.2 From 2c192d30e0ee2941cd2b05282c81441ab389183d Mon Sep 17 00:00:00 2001 From: Krystal Date: Wed, 2 Oct 2024 00:56:34 -0400 Subject: [PATCH 7/9] formatting --- index.tsx | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/index.tsx b/index.tsx index 0e1c531..52078eb 100644 --- a/index.tsx +++ b/index.tsx @@ -1,3 +1,9 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + // import { ProfileBadge } from "@api/Badges"; import { Badges } from "@api/index"; @@ -19,7 +25,7 @@ export default definePlugin({ authors: [ { name: "KrystalSkullOfficial", id: 929208515883569182n }, Devs.nin0dev, - ], + ], settingsAboutComponent: () => <> Only you can view the badges. No, this can't and won't be changed. You may need to reload Discord after editing your settings for them to apply. @@ -49,8 +55,8 @@ export default definePlugin({ goldenBugHunter: { type: OptionType.BOOLEAN }, - // shout out krystalskullofficial - // Nino missed some badges + // shout out krystalskullofficial + // Nino missed some badges hypesquadEvents: { type: OptionType.BOOLEAN }, @@ -69,22 +75,22 @@ export default definePlugin({ nitro: { type: OptionType.BOOLEAN }, - serverBooster:{ + serverBooster: { type: OptionType.BOOLEAN }, - supportsCommands:{ + supportsCommands: { type: OptionType.BOOLEAN }, - premiumApp:{ + premiumApp: { type: OptionType.BOOLEAN }, - usesAutomod:{ + usesAutomod: { type: OptionType.BOOLEAN }, - legacyUsername:{ + legacyUsername: { type: OptionType.BOOLEAN }, - aClownForATime:{ + aClownForATime: { type: OptionType.BOOLEAN }, }), @@ -146,8 +152,8 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.goldenBugHunter, link: "https://discord.com/settings/premium" }, - // shout out krystalskullofficial - // Nino missed some badges + // shout out krystalskullofficial + // Nino missed some badges { description: "HypeSquad Events", image: "https://cdn.discordapp.com/badge-icons/bf01d1073931f921909045f3a39fd264.png", @@ -156,21 +162,21 @@ export default definePlugin({ link: "https://support.discord.com/hc/en-us/articles/360035962891-Profile-Badges-101#h_01GM67K5EJ16ZHYZQ5MPRW3JT3" }, { - description: "House Of Bravery", + description: "HypeSquad Bravery", image: "https://cdn.discordapp.com/badge-icons/8a88d63823d8a71cd5e390baa45efa02.png", position: Badges.BadgePosition.END, shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.houseOfBravery, link: "https://discord.com/settings/hypesquad-online" }, { - description: "House Of Briliance", + description: "HypeSquad Briliance", image: "https://cdn.discordapp.com/badge-icons/011940fd013da3f7fb926e4a1cd2e618.png", position: Badges.BadgePosition.END, shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.houseOfBrilliance, link: "https://discord.com/settings/hypesquad-online" }, { - description: "House Of Balance", + description: "HypeSquad Balance", image: "https://cdn.discordapp.com/badge-icons/3aa41de486fa12454c3761e8e223442e.png", position: Badges.BadgePosition.END, shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.houseOfBalance, @@ -204,7 +210,7 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.supportsCommands, link: "https://discord.com/blog/welcome-to-the-new-era-of-discord-apps?ref=badge" }, - // these badges dont have a link because they literally dont link anywhere + // these badges dont have a link because they literally dont link anywhere { description: "Premium App", image: "https://cdn.discordapp.com/badge-icons/d2010c413a8da2208b7e4f35bd8cd4ac.png", @@ -226,7 +232,7 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.legacyUsername, link: "" }, - // Im linking to a dicord video about lootboxs incase someone doesnt know the context behind this badge + // Im linking to a dicord video about lootboxs incase someone doesnt know the context behind this badge { description: "A clown, for a limited time", image: "https://discord.com/assets/971cfe4aa5c0582000ea.svg", -- 2.45.2 From c62d09831be2d37060fd286b5c87e6403061f603 Mon Sep 17 00:00:00 2001 From: Krystal Date: Wed, 2 Oct 2024 12:45:40 -0400 Subject: [PATCH 8/9] clean up --- index.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/index.tsx b/index.tsx index 52078eb..7603e1b 100644 --- a/index.tsx +++ b/index.tsx @@ -11,6 +11,7 @@ import { definePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; import { Forms, Toasts, UserStore } from "@webpack/common"; +// eslint-disable-next-line unused-imports/no-unused-imports import { User } from "discord-types/general"; function isCurrentUser(userId: string) { @@ -78,6 +79,11 @@ export default definePlugin({ serverBooster: { type: OptionType.BOOLEAN }, + legacyUsername: { + type: OptionType.BOOLEAN + }, + + // These are badges meant for bots so idk why you would want but might as well add them supportsCommands: { type: OptionType.BOOLEAN }, @@ -87,9 +93,8 @@ export default definePlugin({ usesAutomod: { type: OptionType.BOOLEAN }, - legacyUsername: { - type: OptionType.BOOLEAN - }, + + // These is a badge discord made for april fools 2024, again idk why you would want it but might as well add it aClownForATime: { type: OptionType.BOOLEAN }, @@ -197,7 +202,7 @@ export default definePlugin({ link: "https://discord.com/settings/premium" }, { - description: "Discord 24months booster", + description: "Server Booster", image: "https://cdn.discordapp.com/badge-icons/ec92202290b48d0879b7413d2dde3bab.png", position: Badges.BadgePosition.END, shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.serverBooster, @@ -210,7 +215,9 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.supportsCommands, link: "https://discord.com/blog/welcome-to-the-new-era-of-discord-apps?ref=badge" }, + // these badges dont have a link because they literally dont link anywhere + // also they are meant for bots so idk why you would want them but added them just because { description: "Premium App", image: "https://cdn.discordapp.com/badge-icons/d2010c413a8da2208b7e4f35bd8cd4ac.png", @@ -232,6 +239,7 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.legacyUsername, link: "" }, + // Im linking to a dicord video about lootboxs incase someone doesnt know the context behind this badge { description: "A clown, for a limited time", -- 2.45.2 From 4a086d67cafd37d5e1fe2fec3df8e70ef3694f28 Mon Sep 17 00:00:00 2001 From: Krystal Date: Wed, 2 Oct 2024 16:56:30 -0400 Subject: [PATCH 9/9] force restart --- index.tsx | 64 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/index.tsx b/index.tsx index 7603e1b..bfb3c2b 100644 --- a/index.tsx +++ b/index.tsx @@ -19,7 +19,6 @@ function isCurrentUser(userId: string) { return u == userId; } - export default definePlugin({ name: "ClientSideBadges", description: "Adds client-side badges to your profile. Other users can't see them!", @@ -33,70 +32,91 @@ export default definePlugin({ , settings: definePluginSettings({ discordStaff: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, partneredServerOwner: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, earlySupporter: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, activeDeveloper: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, earlyVerifiedBotDeveloper: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, moderatorProgramsAlumni: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, bugHunter: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, goldenBugHunter: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, + // shout out krystalskullofficial // Nino missed some badges hypesquadEvents: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, houseOfBravery: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, houseOfBrilliance: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, houseOfBalance: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, discordQuests: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, nitro: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, serverBooster: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, legacyUsername: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, // These are badges meant for bots so idk why you would want but might as well add them supportsCommands: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, premiumApp: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, usesAutomod: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, // These is a badge discord made for april fools 2024, again idk why you would want it but might as well add it aClownForATime: { - type: OptionType.BOOLEAN + type: OptionType.BOOLEAN, + restartNeeded: true, }, }), async start() { @@ -157,6 +177,7 @@ export default definePlugin({ shouldShow: ({ userId }) => isCurrentUser(userId) && this.settings.store.goldenBugHunter, link: "https://discord.com/settings/premium" }, + // shout out krystalskullofficial // Nino missed some badges { @@ -217,7 +238,6 @@ export default definePlugin({ }, // these badges dont have a link because they literally dont link anywhere - // also they are meant for bots so idk why you would want them but added them just because { description: "Premium App", image: "https://cdn.discordapp.com/badge-icons/d2010c413a8da2208b7e4f35bd8cd4ac.png", -- 2.45.2