Fix trying to load from wrong location

This commit is contained in:
SileNce5k 2021-06-22 16:20:27 +02:00
parent 6bfa3dec46
commit 4b9f8e3687
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
3 changed files with 8 additions and 8 deletions

View file

@ -7,7 +7,7 @@ module.exports = {
name: 'netload',
description: 'Load a module from the internet',
execute({ message, args, prefix, client, owners }) {
let json = fs.readFileSync('/data/netmoduleWhitelist.json', 'utf8');
let json = fs.readFileSync('./data/netmoduleWhitelist.json', 'utf8');
let whitelist = JSON.parse(json)
console.log(json.indexOf(message.author.id.toString()) == -1)
if (json.indexOf(message.author.id.toString()) == -1) {
@ -16,7 +16,7 @@ module.exports = {
}
if (args[0] == "whitelist" && owners.indexOf(message.author.id.toString()) >= 0) {
whitelist.push(args[1])
fs.writeFileSync("/data/netmoduleWhitelist.json", JSON.stringify(whitelist, null, 4))
fs.writeFileSync("./data/netmoduleWhitelist.json", JSON.stringify(whitelist, null, 4))
return;
}
if (!args[0] && message.attachments.size == 0) {