diff --git a/src/plugins/_core/supportHelper.tsx b/src/plugins/_core/supportHelper.tsx index faea66bf..de8e37c7 100644 --- a/src/plugins/_core/supportHelper.tsx +++ b/src/plugins/_core/supportHelper.tsx @@ -17,6 +17,7 @@ */ import { addAccessory } from "@api/MessageAccessories"; +import { definePluginSettings } from "@api/Settings"; import { getUserSettingLazy } from "@api/UserSettings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Flex } from "@components/Flex"; @@ -32,12 +33,12 @@ import { onlyOnce } from "@utils/onlyOnce"; import { makeCodeblock } from "@utils/text"; import definePlugin from "@utils/types"; import { checkForUpdates, isOutdated, update } from "@utils/updater"; -import { Alerts, Button, Card, ChannelStore, Forms, GuildMemberStore, Parser, RelationshipStore, showToast, Toasts, UserStore } from "@webpack/common"; +import { Alerts, Button, Card, ChannelStore, Forms, GuildMemberStore, Parser, RelationshipStore, showToast, Text, Toasts, UserStore } from "@webpack/common"; import gitHash from "~git-hash"; import plugins, { PluginMeta } from "~plugins"; -import settings from "./settings"; +import SettingsPlugin from "./settings"; const VENCORD_GUILD_ID = "1015060230222131221"; const VENBOT_USER_ID = "1017176847865352332"; @@ -86,7 +87,7 @@ async function generateDebugInfoMessage() { const info = { Vencord: `v${VERSION} • [${gitHash}]()` + - `${settings.additionalInfo} - ${Intl.DateTimeFormat("en-GB", { dateStyle: "medium" }).format(BUILD_TIMESTAMP)}`, + `${SettingsPlugin.additionalInfo} - ${Intl.DateTimeFormat("en-GB", { dateStyle: "medium" }).format(BUILD_TIMESTAMP)}`, Client: `${RELEASE_CHANNEL} ~ ${client}`, Platform: window.navigator.platform }; @@ -132,6 +133,10 @@ function generatePluginList() { const checkForUpdatesOnce = onlyOnce(checkForUpdates); +const settings = definePluginSettings({}).withPrivateSettings<{ + dismissedDevBuildWarning?: boolean; +}>(); + export default definePlugin({ name: "SupportHelper", required: true, @@ -139,6 +144,8 @@ export default definePlugin({ authors: [Devs.Ven], dependencies: ["CommandsAPI", "UserSettingsAPI", "MessageAccessoriesAPI"], + settings, + patches: [{ find: ".BEGINNING_DM.format", replacement: { @@ -207,17 +214,22 @@ export default definePlugin({ }); } - const repo = await VencordNative.updater.getRepo(); - if (repo.ok && !repo.value.includes("Vendicated/Vencord")) { + if (!IS_STANDALONE && !settings.store.dismissedDevBuildWarning) { return Alerts.show({ title: "Hold on!", body:
- You are using a fork of Vencord, which we do not provide support for! + You are using a custom build of Vencord, which we do not provide support for! + - Please either switch to an officially supported version of Vencord, or - contact your package maintainer for support instead. + We only provide support for official builds. + Either switch to an official build or figure your issue out yourself. -
+ + You will be banned from receiving support if you ignore this rule. + , + confirmText: "Understood", + secondaryConfirmText: "Don't show again", + onConfirmSecondary: () => settings.store.dismissedDevBuildWarning = true }); } }