mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 07:38:00 -05:00
idk bunch of plugins did not load so changed back
This commit is contained in:
parent
508b6a64c7
commit
ed928977aa
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ const path = require('path')
|
||||||
async function loadPlugins (bot, dcclient, config, rl, target, client, proxy, clientPacketBlacklist, targetPacketBlacklist) {
|
async function loadPlugins (bot, dcclient, config, rl, target, client, proxy, clientPacketBlacklist, targetPacketBlacklist) {
|
||||||
const dir = path.join(__dirname, '..', 'plugins', proxy ? 'proxy' : '')
|
const dir = path.join(__dirname, '..', 'plugins', proxy ? 'proxy' : '')
|
||||||
const plugins = await fs.readdir(dir)
|
const plugins = await fs.readdir(dir)
|
||||||
for (const plugin of plugins) {
|
plugins.forEach((plugin) => {
|
||||||
if (!plugin.endsWith('.js')) return
|
if (!plugin.endsWith('.js')) return
|
||||||
try {
|
try {
|
||||||
const plug = require(path.join(dir, plugin))
|
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(`Plugin ${plugin} is having exception loading the plugin:`)
|
||||||
console.log(util.inspect(e))
|
console.log(util.inspect(e))
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = { loadPlugins }
|
module.exports = { loadPlugins }
|
||||||
|
|
Loading…
Reference in a new issue