Convert spaces to tabs
This commit is contained in:
parent
4576eec78a
commit
db04c07c60
17 changed files with 327 additions and 327 deletions
|
@ -3,17 +3,17 @@ const netloadDir = 'netload/'
|
|||
|
||||
|
||||
module.exports = function (client) {
|
||||
if (!fs.existsSync(netloadDir)) fs.mkdirSync(netloadDir);
|
||||
let commandFiles = fs.readdirSync(netloadDir).filter(file => file.endsWith('.js'));
|
||||
if (client.netmodules.size != 0) {
|
||||
for (const i of commandFiles) {
|
||||
delete require.cache[require.resolve(`../${netloadDir}${i}`)];
|
||||
}
|
||||
}
|
||||
client.netmodules.clear()
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`../${netloadDir}${file}`);
|
||||
client.netmodules.set(command.name, command);
|
||||
}
|
||||
if (!fs.existsSync(netloadDir)) fs.mkdirSync(netloadDir);
|
||||
let commandFiles = fs.readdirSync(netloadDir).filter(file => file.endsWith('.js'));
|
||||
if (client.netmodules.size != 0) {
|
||||
for (const i of commandFiles) {
|
||||
delete require.cache[require.resolve(`../${netloadDir}${i}`)];
|
||||
}
|
||||
}
|
||||
client.netmodules.clear()
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`../${netloadDir}${file}`);
|
||||
client.netmodules.set(command.name, command);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue