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 }