diff --git a/src/plugins/experiments.tsx b/src/plugins/experiments.tsx index ed29aa7f..cc8309df 100644 --- a/src/plugins/experiments.tsx +++ b/src/plugins/experiments.tsx @@ -17,7 +17,10 @@ */ import { definePluginSettings } from "@api/Settings"; +import ErrorBoundary from "@components/ErrorBoundary"; +import { ErrorCard } from "@components/ErrorCard"; import { Devs } from "@utils/constants"; +import { Margins } from "@utils/margins"; import definePlugin, { OptionType } from "@utils/types"; import { findByPropsLazy } from "@webpack"; import { Forms, React } from "@webpack/common"; @@ -87,6 +90,13 @@ export default definePlugin({ match: /"staging"===window\.GLOBAL_ENV\.RELEASE_CHANNEL/, replace: "true" } + }, + { + find: 'H1,title:"Experiments"', + replacement: { + match: 'title:"Experiments",children:[', + replace: "$&$self.WarningCard()," + } } ], @@ -109,5 +119,19 @@ export default definePlugin({ ); - } + }, + + WarningCard: ErrorBoundary.wrap(() => ( + + Hold on!! + + + Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled. + + + + Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments. + + + ), { noop: true }) });