Make VCSupport Required Unless Dev
Some checks are pending
Test / Test (push) Waiting to run

This commit is contained in:
thororen1234 2025-06-09 22:53:46 -04:00
parent ddafaaa155
commit d53083d3ce
No known key found for this signature in database
2 changed files with 20 additions and 5 deletions

View file

@ -5,11 +5,21 @@
*/ */
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { isEquicordPluginDev, isPluginDev } from "@utils/misc";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { UserStore } from "@webpack/common";
export default definePlugin({ export default definePlugin({
name: "VCSupport", name: "VCSupport",
description: "Wumpus Dance + Support Warnings", description: "Wumpus Dance + Support Warnings",
authors: [EquicordDevs.thororen, EquicordDevs.coolesding], authors: [EquicordDevs.thororen, EquicordDevs.coolesding],
enabledByDefault: true required: true,
start() {
const selfId = UserStore.getCurrentUser()?.id;
if (isPluginDev(selfId) || isEquicordPluginDev(selfId)) {
Vencord.Settings.plugins.VCSupport.enabled = false;
} else {
Vencord.Settings.plugins.VCSupport.enabled = true;
}
}
}); });

View file

@ -22,7 +22,7 @@ import ErrorBoundary from "@components/ErrorBoundary";
import { Flex } from "@components/Flex"; import { Flex } from "@components/Flex";
import { Link } from "@components/Link"; import { Link } from "@components/Link";
import { openUpdaterModal } from "@components/VencordSettings/UpdaterTab"; import { openUpdaterModal } from "@components/VencordSettings/UpdaterTab";
import { CONTRIB_ROLE_ID, Devs, DONOR_ROLE_ID, EQUCORD_HELPERS, EQUIBOP_CONTRIB_ROLE_ID, EQUICORD_TEAM, GUILD_ID, SUPPORT_CHANNEL_ID, VC_CONTRIB_ROLE_ID, VC_DONOR_ROLE_ID, VC_GUILD_ID, VC_REGULAR_ROLE_ID, VC_SUPPORT_CHANNEL_ID, VENCORD_CONTRIB_ROLE_ID } from "@utils/constants"; import { CONTRIB_ROLE_ID, Devs, DONOR_ROLE_ID, EQUCORD_HELPERS, EQUIBOP_CONTRIB_ROLE_ID, EQUICORD_TEAM, GUILD_ID, SUPPORT_CHANNEL_ID, SUPPORT_CHANNEL_IDS, VC_CONTRIB_ROLE_ID, VC_DONOR_ROLE_ID, VC_GUILD_ID, VC_REGULAR_ROLE_ID, VC_SUPPORT_CHANNEL_ID, VENCORD_CONTRIB_ROLE_ID } from "@utils/constants";
import { sendMessage } from "@utils/discord"; import { sendMessage } from "@utils/discord";
import { Logger } from "@utils/Logger"; import { Logger } from "@utils/Logger";
import { Margins } from "@utils/margins"; import { Margins } from "@utils/margins";
@ -196,13 +196,12 @@ export default definePlugin({
flux: { flux: {
async CHANNEL_SELECT({ channelId }) { async CHANNEL_SELECT({ channelId }) {
const isSupportChannel = channelId === SUPPORT_CHANNEL_ID; const isSupportChannel = SUPPORT_CHANNEL_IDS.includes(channelId);
if (!isSupportChannel) return; if (!isSupportChannel) return;
const selfId = UserStore.getCurrentUser()?.id; const selfId = UserStore.getCurrentUser()?.id;
if (!selfId || isPluginDev(selfId) || isEquicordPluginDev(selfId)) return; if (!selfId || isPluginDev(selfId) || isEquicordPluginDev(selfId)) return;
if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport") && !clicked) { if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport") && !clicked) {
clicked = true;
return Alerts.show({ return Alerts.show({
title: "You are entering the support channel!", title: "You are entering the support channel!",
body: <div> body: <div>
@ -215,8 +214,14 @@ export default definePlugin({
<Forms.FormText>issue could be caused by Equicord!</Forms.FormText> <Forms.FormText>issue could be caused by Equicord!</Forms.FormText>
</div>, </div>,
confirmText: "Go to Equicord Support", confirmText: "Go to Equicord Support",
onConfirm() {
clicked = true;
VencordNative.native.openExternal("https://discord.gg/5Xh2W87egW");
},
cancelText: "Okay continue", cancelText: "Okay continue",
onConfirm: () => VencordNative.native.openExternal("https://discord.gg/5Xh2W87egW"), onCancel() {
clicked = true;
},
}); });
} }