From aa4c6e54964569625f0e5010a972919d2503cb58 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:50:25 -0300 Subject: [PATCH 1/4] Update permissions --- src/webpack/common/types/utils.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/webpack/common/types/utils.d.ts b/src/webpack/common/types/utils.d.ts index 03317131d..be43a54b1 100644 --- a/src/webpack/common/types/utils.d.ts +++ b/src/webpack/common/types/utils.d.ts @@ -124,6 +124,7 @@ export type Permissions = "ADD_REACTIONS" | "USE_APPLICATION_COMMANDS" | "USE_CLYDE_AI" | "USE_EMBEDDED_ACTIVITIES" + | "USE_EXTERNAL_APPS" | "USE_EXTERNAL_EMOJIS" | "USE_EXTERNAL_SOUNDS" | "USE_EXTERNAL_STICKERS" From 74bd89b7214468967b4a6cfa2a7fcf1518e370a5 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 12 Jun 2024 23:56:02 -0300 Subject: [PATCH 2/4] Make all plugins use new settings API --- src/components/VencordSettings/ThemesTab.tsx | 2 +- src/plugins/_core/settings.tsx | 41 ++-- src/plugins/banger/index.ts | 8 +- src/plugins/betterNotes/index.tsx | 37 ++-- src/plugins/betterRoleDot/index.ts | 39 ++-- src/plugins/blurNsfw/index.ts | 23 +-- src/plugins/callTimer/index.tsx | 41 ++-- src/plugins/customRPC/index.tsx | 4 +- src/plugins/implicitRelationships/index.ts | 27 ++- src/plugins/messageLogger/index.tsx | 103 +++++----- src/plugins/messageTags/index.ts | 22 ++- src/plugins/noBlockedMessages/index.ts | 23 ++- src/plugins/platformIndicators/index.tsx | 65 +++--- src/plugins/pronoundb/pronoundbUtils.ts | 5 +- src/plugins/serverListIndicators/index.tsx | 29 +-- .../components/HiddenChannelLockScreen.tsx | 5 +- src/plugins/spotifyControls/SpotifyStore.ts | 5 +- src/plugins/spotifyControls/index.tsx | 33 ++-- src/plugins/typingIndicator/index.tsx | 4 +- src/plugins/vcNarrator/index.tsx | 186 +++++++++--------- 20 files changed, 349 insertions(+), 353 deletions(-) diff --git a/src/components/VencordSettings/ThemesTab.tsx b/src/components/VencordSettings/ThemesTab.tsx index 27e077fdc..bcdef2985 100644 --- a/src/components/VencordSettings/ThemesTab.tsx +++ b/src/components/VencordSettings/ThemesTab.tsx @@ -250,7 +250,7 @@ function ThemesTab() { Edit QuickCSS - {Vencord.Settings.plugins.ClientTheme.enabled && ( + {Vencord.Plugins.isPluginEnabled("ClientTheme") && ( ))} From f726376ab82aeb47dc165fbb9912d8a64e6f7e5a Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 12 Jun 2024 23:59:42 -0300 Subject: [PATCH 3/4] avoid circular dependency --- src/components/PluginSettings/index.tsx | 2 +- src/plugins/spotifyControls/SpotifyStore.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx index 0872c96d5..2ae5239da 100644 --- a/src/components/PluginSettings/index.tsx +++ b/src/components/PluginSettings/index.tsx @@ -40,7 +40,7 @@ import { Alerts, Button, Card, Forms, lodash, Parser, React, Select, Text, TextI import Plugins from "~plugins"; // Avoid circular dependency -const { startDependenciesRecursive, startPlugin, stopPlugin } = proxyLazy(() => require("../../plugins")); +const { startDependenciesRecursive, startPlugin, stopPlugin } = proxyLazy(() => require("../../plugins")) as typeof import("../../plugins"); const cl = classNameFactory("vc-plugins-"); const logger = new Logger("PluginSettings", "#a6d189"); diff --git a/src/plugins/spotifyControls/SpotifyStore.ts b/src/plugins/spotifyControls/SpotifyStore.ts index 50ed9a52e..33c9b4c7e 100644 --- a/src/plugins/spotifyControls/SpotifyStore.ts +++ b/src/plugins/spotifyControls/SpotifyStore.ts @@ -16,10 +16,11 @@ * along with this program. If not, see . */ +import { proxyLazy } from "@utils/lazy"; import { findByProps, webpackDependantLazy } from "@webpack"; import { Flux, FluxDispatcher } from "@webpack/common"; -import { settings } from "."; +const { settings } = proxyLazy(() => require(".")) as typeof import("."); export interface Track { id: string; From 591f433135c4bb6996afe80cf8c4026a3473d054 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 13 Jun 2024 00:00:15 -0300 Subject: [PATCH 4/4] forgot the comment --- src/plugins/spotifyControls/SpotifyStore.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/spotifyControls/SpotifyStore.ts b/src/plugins/spotifyControls/SpotifyStore.ts index 33c9b4c7e..78253914f 100644 --- a/src/plugins/spotifyControls/SpotifyStore.ts +++ b/src/plugins/spotifyControls/SpotifyStore.ts @@ -20,6 +20,7 @@ import { proxyLazy } from "@utils/lazy"; import { findByProps, webpackDependantLazy } from "@webpack"; import { Flux, FluxDispatcher } from "@webpack/common"; +// Avoid circular dependency const { settings } = proxyLazy(() => require(".")) as typeof import("."); export interface Track {