|
|
|
@ -17,12 +17,15 @@ module.exports = class taglistCommand extends Command {
|
|
|
|
|
if(blacklist[message.author.id])
|
|
|
|
|
return message.channel.send("You are blacklisted")
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
let customresponse = new SelfReloadJSON(`./tag/${message.guild.id}.json`);
|
|
|
|
|
let count = Object.keys(customresponse).length
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fs.readFile(`./tag/${message.guild.id}.json`, 'utf8', function readFileCallback(err, data){
|
|
|
|
|
if (err)
|
|
|
|
|
if (err) {
|
|
|
|
|
console.log(err);
|
|
|
|
|
}
|
|
|
|
|
let json = JSON.stringify(data)
|
|
|
|
|
json = json.replace(/[{}"\\]+/g, '')
|
|
|
|
|
json = json.replace(/,+/g, '\n')
|
|
|
|
@ -33,7 +36,13 @@ module.exports = class taglistCommand extends Command {
|
|
|
|
|
.setFooter(`You have ${count} tags on this server`)
|
|
|
|
|
|
|
|
|
|
message.say(tagEmbed);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
} catch {
|
|
|
|
|
message.say('An error has occured, do you have any tags on the server?')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|