properly delete the tag

This commit is contained in:
Loic Bersier 2018-12-07 00:26:19 +01:00
parent 045e8d9503
commit 477d8ec6ee

View file

@ -34,7 +34,7 @@ module.exports = class CustomResponseCommand extends Command {
console.log(err);
} else {
customresponse = JSON.parse(data); //now it an object
customresponse [trigger] = ''
delete customresponse[trigger]
json = JSON.stringify(customresponse); //convert it back to json
fs.writeFile(`./tag/${message.guild.id}.json`, json, 'utf8', function(err) {
if(err) {