diff --git a/commands/admin/autoresponse.js b/commands/admin/autoresponse.js index 822571c..b1b84ec 100644 --- a/commands/admin/autoresponse.js +++ b/commands/admin/autoresponse.js @@ -36,7 +36,7 @@ module.exports = class AutoresponseCommand extends Command { if (all == 'all') { const guild = this.client.guilds.get(message.guild.id); - fs.readFile('DiscordBot/json/autoresponse.json', 'utf8', function readFileCallback(err, data){ + fs.readFile('./json/autoresponse.json', 'utf8', function readFileCallback(err, data){ if (err){ console.log(err); } else { @@ -44,7 +44,7 @@ module.exports = class AutoresponseCommand extends Command { guild.channels.forEach(channel => autoresponse [channel] = text) json = JSON.stringify(autoresponse); //convert it back to json json = json.replace(/[<#>]/g, '') - fs.writeFile('DiscordBot/json/autoresponse.json', json, 'utf8', function(err) { + fs.writeFile('./json/autoresponse.json', json, 'utf8', function(err) { if(err) { return console.log(err); } @@ -52,14 +52,14 @@ module.exports = class AutoresponseCommand extends Command { return message.say('Auto response have been disable/enable on every channel') } else if(text == 'disable' || 'enable') { - fs.readFile('DiscordBot/json/autoresponse.json', 'utf8', function readFileCallback(err, data){ + fs.readFile('./json/autoresponse.json', 'utf8', function readFileCallback(err, data){ if (err){ console.log(err); } else { autoresponse = JSON.parse(data); //now it an object autoresponse [message.channel.id] = text json = JSON.stringify(autoresponse); //convert it back to json - fs.writeFile('DiscordBot/json/autoresponse.json', json, 'utf8', function(err) { + fs.writeFile('./json/autoresponse.json', json, 'utf8', function(err) { if(err) { return console.log(err); } diff --git a/commands/fun/advice.js b/commands/fun/advice.js index 19bb322..9b1880c 100644 --- a/commands/fun/advice.js +++ b/commands/fun/advice.js @@ -15,7 +15,7 @@ module.exports = class AdviceCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/badmeme.js b/commands/fun/badmeme.js index bbe40b4..9df9b5e 100644 --- a/commands/fun/badmeme.js +++ b/commands/fun/badmeme.js @@ -14,7 +14,7 @@ module.exports = class BadMemeCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/clap.js b/commands/fun/clap.js index bb975da..680b099 100644 --- a/commands/fun/clap.js +++ b/commands/fun/clap.js @@ -19,7 +19,7 @@ module.exports = class clapCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/dank.js b/commands/fun/dank.js index 8a9e39b..74af0bc 100644 --- a/commands/fun/dank.js +++ b/commands/fun/dank.js @@ -13,7 +13,7 @@ module.exports = class dankCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/despacito.js b/commands/fun/despacito.js index aa524ac..4bd1476 100644 --- a/commands/fun/despacito.js +++ b/commands/fun/despacito.js @@ -24,7 +24,7 @@ module.exports = class DespacitoCommand extends Command { } async run(message, { user }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/emotesay.js b/commands/fun/emotesay.js index 4333657..ce34549 100644 --- a/commands/fun/emotesay.js +++ b/commands/fun/emotesay.js @@ -20,7 +20,7 @@ module.exports = class emoteSayCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/funfact.js b/commands/fun/funfact.js index 457135b..6b960e1 100644 --- a/commands/fun/funfact.js +++ b/commands/fun/funfact.js @@ -13,7 +13,7 @@ module.exports = class FunFactCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/ib.js b/commands/fun/ib.js index c4e4d30..6976b51 100644 --- a/commands/fun/ib.js +++ b/commands/fun/ib.js @@ -15,7 +15,7 @@ module.exports = class BadMemeCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/print.js b/commands/fun/print.js index cbbcbb6..789b02c 100644 --- a/commands/fun/print.js +++ b/commands/fun/print.js @@ -25,7 +25,7 @@ module.exports = class printCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/reddit.js b/commands/fun/reddit.js index b1f2f80..77c21e0 100644 --- a/commands/fun/reddit.js +++ b/commands/fun/reddit.js @@ -21,7 +21,7 @@ module.exports = class redditCommand extends Command { } async run(message, { sub }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/say.js b/commands/fun/say.js index 6fe4503..f5f3196 100644 --- a/commands/fun/say.js +++ b/commands/fun/say.js @@ -20,7 +20,7 @@ module.exports = class sayCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/fun/sayd.js b/commands/fun/sayd.js index 478d937..75ca916 100644 --- a/commands/fun/sayd.js +++ b/commands/fun/sayd.js @@ -20,7 +20,7 @@ module.exports = class saydCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/images/face.js b/commands/images/face.js index 14f0e1d..786e595 100644 --- a/commands/images/face.js +++ b/commands/images/face.js @@ -30,7 +30,7 @@ module.exports = class faceappCommand extends Command { } async run(message, { url, type }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/images/fetish.js b/commands/images/fetish.js index 25306cc..a880c59 100644 --- a/commands/images/fetish.js +++ b/commands/images/fetish.js @@ -17,7 +17,7 @@ module.exports = class fetishCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/images/god.js b/commands/images/god.js index 3d2f901..cc78031 100644 --- a/commands/images/god.js +++ b/commands/images/god.js @@ -17,7 +17,7 @@ module.exports = class godCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/images/human.js b/commands/images/human.js index 562deee..e08ad6d 100644 --- a/commands/images/human.js +++ b/commands/images/human.js @@ -17,7 +17,7 @@ module.exports = class humanCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/images/idubbbz.js b/commands/images/idubbbz.js index 03c2ff9..d78f85a 100644 --- a/commands/images/idubbbz.js +++ b/commands/images/idubbbz.js @@ -26,7 +26,7 @@ module.exports = class idubbbzCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/images/idubbbzpaint.js b/commands/images/idubbbzpaint.js index 381602b..f78f9bb 100644 --- a/commands/images/idubbbzpaint.js +++ b/commands/images/idubbbzpaint.js @@ -26,7 +26,7 @@ module.exports = class idubbbzpaintCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/images/like.js b/commands/images/like.js index d15b812..a60378d 100644 --- a/commands/images/like.js +++ b/commands/images/like.js @@ -17,7 +17,7 @@ module.exports = class likeCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/images/ugly.js b/commands/images/ugly.js index 8c532f9..f36e036 100644 --- a/commands/images/ugly.js +++ b/commands/images/ugly.js @@ -17,7 +17,7 @@ module.exports = class uglyCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/avatar.js b/commands/utility/avatar.js index b928ec1..26fff88 100644 --- a/commands/utility/avatar.js +++ b/commands/utility/avatar.js @@ -21,7 +21,7 @@ module.exports = class AvatarCommand extends Command { } async run(message, { user }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/download.js b/commands/utility/download.js index 83f7537..800f97f 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -23,7 +23,7 @@ module.exports = class downloadCommand extends Command { } async run(message, { link }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/feedback.js b/commands/utility/feedback.js index a3f93d8..b5f95c3 100644 --- a/commands/utility/feedback.js +++ b/commands/utility/feedback.js @@ -25,7 +25,7 @@ module.exports = class feedbackCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/info.js b/commands/utility/info.js index b17ebda..453e0d8 100644 --- a/commands/utility/info.js +++ b/commands/utility/info.js @@ -21,7 +21,7 @@ module.exports = class InfoCommand extends Command { } async run(message, { search }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/invite.js b/commands/utility/invite.js index 6030277..1637343 100644 --- a/commands/utility/invite.js +++ b/commands/utility/invite.js @@ -13,7 +13,7 @@ module.exports = class InviteCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/ping.js b/commands/utility/ping.js index 81ca764..5648666 100644 --- a/commands/utility/ping.js +++ b/commands/utility/ping.js @@ -17,7 +17,7 @@ module.exports = class PingCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/stats.js b/commands/utility/stats.js index 37dab72..9cbbc11 100644 --- a/commands/utility/stats.js +++ b/commands/utility/stats.js @@ -12,7 +12,7 @@ module.exports = class statsCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/supportme.js b/commands/utility/supportme.js index fad37ab..2e1eb6e 100644 --- a/commands/utility/supportme.js +++ b/commands/utility/supportme.js @@ -12,7 +12,7 @@ module.exports = class supportMeCommand extends Command { } async run(message, { text }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/tag.js b/commands/utility/tag.js index b920c14..07daf4d 100644 --- a/commands/utility/tag.js +++ b/commands/utility/tag.js @@ -40,9 +40,9 @@ module.exports = class CustomResponseCommand extends Command { - fs.readFile(`DiscordBot/tag/${message.guild.id}.json`, 'utf8', function readFileCallback(err, data){ + fs.readFile(`./tag/${message.guild.id}.json`, 'utf8', function readFileCallback(err, data){ if (err){ - fs.writeFile(`DiscordBot/tag/${message.guild.id}.json`, `{"${trigger}":"${response}"}`, function (err) { + fs.writeFile(`./tag/${message.guild.id}.json`, `{"${trigger}":"${response}"}`, function (err) { if (err){ console.log(err); } @@ -51,7 +51,7 @@ module.exports = class CustomResponseCommand extends Command { customresponse = JSON.parse(data); //now it an object customresponse [trigger] = response json = JSON.stringify(customresponse); //convert it back to json - fs.writeFile(`DiscordBot/tag/${message.guild.id}.json`, json, 'utf8', function(err) { + fs.writeFile(`./tag/${message.guild.id}.json`, json, 'utf8', function(err) { if(err) { return console.log(err); } diff --git a/commands/utility/translate.js b/commands/utility/translate.js index 9390256..bd05198 100644 --- a/commands/utility/translate.js +++ b/commands/utility/translate.js @@ -31,7 +31,7 @@ module.exports = class translationCommand extends Command { } async run(message, { text, language }) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/commands/utility/untag.js b/commands/utility/untag.js index 876cba5..34f46ca 100644 --- a/commands/utility/untag.js +++ b/commands/utility/untag.js @@ -29,14 +29,14 @@ module.exports = class CustomResponseCommand extends Command { let json = JSON.stringify(customresponse) - fs.readFile(`DiscordBot/tag/${message.guild.id}.json`, 'utf8', function readFileCallback(err, data){ + fs.readFile(`./tag/${message.guild.id}.json`, 'utf8', function readFileCallback(err, data){ if (err){ console.log(err); } else { customresponse = JSON.parse(data); //now it an object customresponse [trigger] = '' json = JSON.stringify(customresponse); //convert it back to json - fs.writeFile(`DiscordBot/tag/${message.guild.id}.json`, json, 'utf8', function(err) { + fs.writeFile(`./tag/${message.guild.id}.json`, json, 'utf8', function(err) { if(err) { return console.log(err); } diff --git a/commands/utility/updoot.js b/commands/utility/updoot.js index df85bde..65826db 100644 --- a/commands/utility/updoot.js +++ b/commands/utility/updoot.js @@ -13,7 +13,7 @@ module.exports = class UpDootCommand extends Command { } async run(message) { - let blacklistJson = new SelfReloadJSON('DiscordBot/json/blacklist.json'); + let blacklistJson = new SelfReloadJSON('./json/blacklist.json'); if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) diff --git a/index.js b/index.js index 8606f7e..a80a60e 100644 --- a/index.js +++ b/index.js @@ -75,8 +75,8 @@ client.registry }); client.on("message", async (message) => { - var customresponse = new SelfReloadJSON(`DisocrdBot/tag/${message.guild.id}.json`); - var autoresponse = new SelfReloadJSON('DiscordBot/json/autoresponse.json'); + var customresponse = new SelfReloadJSON(`./tag/${message.guild.id}.json`); + var autoresponse = new SelfReloadJSON('./json/autoresponse.json'); let message_content = message.content.toLowerCase(); if (message.author.bot) return; {