little fix for an unknown bug

This commit is contained in:
Loic Bersier 2018-12-09 07:53:53 +01:00
parent 134f799556
commit eb4acd503f

View file

@ -81,14 +81,15 @@ client.registry
var autoresponse = new SelfReloadJSON('./json/autoresponse.json'); var autoresponse = new SelfReloadJSON('./json/autoresponse.json');
let message_content = message.content.toLowerCase(); let message_content = message.content.toLowerCase();
if (message_content.includes('stop')) return; if (message_content == ('stop')) return;
if (message_content == ('is')) return;
if (message_content == ('on')) return;
if (message.author.bot) return; { if (message.author.bot) return; {
// User autoresponse // User autoresponse
if(customresponse[message_content]) if(customresponse[message_content]) {
message.channel.send(customresponse[message_content]) message.channel.send(customresponse[message_content])
}
// If autoresponse is enable send the response // If autoresponse is enable send the response
if(autoresponse[message.channel.id] == 'enable') { if(autoresponse[message.channel.id] == 'enable') {
// Reply with images as attachement // Reply with images as attachement