New Plugin: DiscordDevBanner (#301)

* DiscordDevBanner

* change default

* readme

* idk

* bump count

* make patch

* Update showBadges vencord badge
This commit is contained in:
Indiana Jone (Indi) 2025-07-13 16:05:33 -04:00 • committed by GitHub
parent 9d33e9f088
commit 4288192dbe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 61 additions and 4 deletions

View file

@ -11,7 +11,7 @@ You can join our [discord server](https://discord.gg/equicord-117327988606502929
### Extra included plugins
<details>
<summary>193 additional plugins</summary>
<summary>194 additional plugins</summary>
### All Platforms
@ -53,6 +53,7 @@ You can join our [discord server](https://discord.gg/equicord-117327988606502929
- DecodeBase64 by ThePirateStoner
- Demonstration by Samwich
- DisableAnimations by S€th
- DiscordDevBanner by KrystalSkull
- DisableCameras by Joona
- DontFilterMe by Samwich
- Encryptcord by Inbestigator
@ -82,7 +83,7 @@ You can join our [discord server](https://discord.gg/equicord-117327988606502929
- GitHubRepos by talhakf
- Glide by Samwich
- GlobalBadges by HypedDomi & Hosted by Wolfie
- GoogleThat by Samwich
- GoogleThat by Samwich & KrystalSkull
- GuildPickerDumper by Cortex, Samwich, Synth, thororen
- GuildTagSettings by thororen
- HideChatButtons by iamme

View file

@ -0,0 +1,56 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { migratePluginSettings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types";
// By default Discord only seems to only display 'Staging' so we map the names ourself
const names: Record<string, string> = {
stable: "Stable",
ptb: "PTB",
canary: "Canary",
staging: "Staging"
};
// Useless for the normal User, but useful for me
migratePluginSettings("DiscordDevBanner", "devBanner");
export default definePlugin({
name: "DiscordDevBanner",
description: "Enables the Discord developer banner, in which displays the build-ID",
authors: [EquicordDevs.KrystalSkull],
patches: [
{
find: ".devBanner,",
replacement: [
{
match: '"staging"===window.GLOBAL_ENV.RELEASE_CHANNEL',
replace: "true"
},
{
match: /(\i=\(\)=>)\(.*?\}\);/,
replace: "$1null;"
},
{
match: /\i\.\i\.format\(.{0,15},{buildNumber:(.{0,10})}\)/,
replace: "$self.transform($1)"
},
]
}
],
transform(buildNumber: string) {
const releaseChannel: string = window.GLOBAL_ENV.RELEASE_CHANNEL;
if (names[releaseChannel]) {
return `${names[releaseChannel]} ${buildNumber}`;
} else {
return `${releaseChannel.charAt(0).toUpperCase() + releaseChannel.slice(1)} ${buildNumber}`;
}
},
});

View file

@ -86,7 +86,7 @@ function CheckBadge({ badge, author }: { badge: string; author: User; }): JSX.El
className={roleIconClassName}
name="Vencord Contributor"
size={20}
src={"https://vencord.dev/assets/favicon.png"}
src={"https://cdn.discordapp.com/emojis/1092089799109775453.png"}
/>
</span>
) : null;

View file

@ -95,7 +95,7 @@ const BadgeSettings = () => {
{ src: "https://cdn.nest.rip/uploads/78cb1e77-b7a6-4242-9089-e91f866159bf.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://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/emojis/1092089799109775453.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 },
{ src: "https://cdn.discordapp.com/badge-icons/2ba85e8026a8614b640c2837bcdfe21b.png", shown: settings.store.showDiscordNitro, title: "Nitro badge", key: "DiscordNitro", position: settings.store.DiscordNitroPosition }
]);