diff --git a/event/listeners/message.js b/event/listeners/message.js index 162ba71a..600c53e3 100644 --- a/event/listeners/message.js +++ b/event/listeners/message.js @@ -15,15 +15,9 @@ class messageListener extends Listener { async exec(message) { let autoresponse = reload('../../json/autoresponse.json'); let message_content = message.content.toLowerCase(); - let customresponse = reload(`../../tag/${message.guild.id}.json`); if (message.author.bot) return; { - // User autoresponse - if(customresponse[message_content]) { - message.channel.send(customresponse[message_content]); - } - // If autoresponse is enable send the response if(autoresponse[message.channel.id] == 'enable') { // Reply with images as attachement @@ -44,6 +38,11 @@ class messageListener extends Listener { } else if (message_content.includes('jeff')) { message.react('496028845967802378'); } + } + // User autoresponse + let customresponse = reload(`../../tag/${message.guild.id}.json`); + if(customresponse[message_content]) { + message.channel.send(customresponse[message_content]); } } }