aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/index.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-08-31 04:07:16 +0200
committerVendicated <vendicated@riseup.net>2022-08-31 04:07:16 +0200
commit98cb301df53305f397ac6e1b4e603c930820f228 (patch)
tree8c3bc642d0871a38f99aa2c2e8586bd7310cb361 /src/plugins/index.ts
parentcb288e204dd531b31f957f82150398d22930fdeb (diff)
downloadVencord-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.ts5
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();