From ed928977aa241cd97afb1a43614dc54268b10130 Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Mon, 23 Jan 2023 19:34:25 +0700 Subject: [PATCH] idk bunch of plugins did not load so changed back --- util/loadPlugins.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/loadPlugins.js b/util/loadPlugins.js index 4357cc6..71896f2 100644 --- a/util/loadPlugins.js +++ b/util/loadPlugins.js @@ -17,7 +17,7 @@ const path = require('path') async function loadPlugins (bot, dcclient, config, rl, target, client, proxy, clientPacketBlacklist, targetPacketBlacklist) { const dir = path.join(__dirname, '..', 'plugins', proxy ? 'proxy' : '') const plugins = await fs.readdir(dir) - for (const plugin of plugins) { + plugins.forEach((plugin) => { if (!plugin.endsWith('.js')) return try { const plug = require(path.join(dir, plugin)) @@ -27,7 +27,7 @@ async function loadPlugins (bot, dcclient, config, rl, target, client, proxy, cl console.log(`Plugin ${plugin} is having exception loading the plugin:`) console.log(util.inspect(e)) } - } + }) }; module.exports = { loadPlugins }