make it reload tag

This commit is contained in:
loicbersier 2019-07-01 21:15:45 +02:00
parent bca150def6
commit 7102329133

View file

@ -42,11 +42,9 @@ class messageListener extends Listener {
}
}
// User autoresponse
if (fs.existsSync(`./tag/${message.guild.id}.json`)) {
let customresponse = require(`../../tag/${message.guild.id}.json`);
let customresponse = reload(`../../tag/${message.guild.id}.json`);
try {
if(customresponse[message_content]) {
let text = customresponse[message_content];
if (text.includes('[ban]')) {
@ -174,15 +172,8 @@ class messageListener extends Listener {
return message.channel.send(text);
}
}
} catch (err) {
null;
}
}
}
}
}