diff options
author | Vendicated <vendicated@riseup.net> | 2022-08-31 04:07:16 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-08-31 04:07:16 +0200 |
commit | 98cb301df53305f397ac6e1b4e603c930820f228 (patch) | |
tree | 8c3bc642d0871a38f99aa2c2e8586bd7310cb361 /src/plugins/index.ts | |
parent | cb288e204dd531b31f957f82150398d22930fdeb (diff) | |
download | Vencord-98cb301df53305f397ac6e1b4e603c930820f228.tar.gz Vencord-98cb301df53305f397ac6e1b4e603c930820f228.tar.bz2 Vencord-98cb301df53305f397ac6e1b4e603c930820f228.zip |
Make Settings & Settings Page
Diffstat (limited to 'src/plugins/index.ts')
-rw-r--r-- | src/plugins/index.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/index.ts b/src/plugins/index.ts index d5b419b..ae67f4f 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -1,4 +1,5 @@ import Plugins from "plugins"; +import { Settings } from "../api/settings"; import Logger from "../utils/logger"; import { Patch } from "../utils/types"; @@ -7,7 +8,7 @@ const logger = new Logger("PluginManager", "#a6d189"); export const plugins = Plugins; export const patches = [] as Patch[]; -for (const plugin of Plugins) if (plugin.patches) { +for (const plugin of Plugins) if (plugin.patches && Settings.plugins[plugin.name].enabled) { for (const patch of plugin.patches) { patch.plugin = plugin.name; if (!Array.isArray(patch.replacement)) patch.replacement = [patch.replacement]; @@ -16,7 +17,7 @@ for (const plugin of Plugins) if (plugin.patches) { } export function startAll() { - for (const plugin of plugins) if (plugin.start) { + for (const plugin of plugins) if (plugin.start && Settings.plugins[plugin.name].enabled) { try { logger.info("Starting plugin", plugin.name); plugin.start(); |