Move config/data files into own directory

This commit is contained in:
SileNce5k 2021-04-21 19:22:50 +02:00
parent db04c07c60
commit f7c36eefbd
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
6 changed files with 14 additions and 14 deletions

View file

@ -1,5 +1,5 @@
const Discord = require('discord.js');
const { prefix } = require('../config.json');
const { prefix } = require('../data/config.json');
const creationJoinDates = require("../util/creationJoinDates")

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('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("netmoduleWhitelist.json", JSON.stringify(whitelist))
fs.writeFileSync("/data/netmoduleWhitelist.json", JSON.stringify(whitelist))
return;
}
if (!args[0] && message.attachments.size == 0) {