Fix trying to load from wrong location
This commit is contained in:
parent
6bfa3dec46
commit
4b9f8e3687
3 changed files with 8 additions and 8 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue