Dosen't spam anymore

This commit is contained in:
Supositware 2019-02-10 16:23:49 +01:00
parent 5cf4c02c9f
commit 4796be772a

View file

@ -42,7 +42,14 @@ class messageListener extends Listener {
} }
} }
// User autoresponse // User autoresponse
let customresponse = reload(`../../tag/${message.guild.id}.json`); let customresponse;
try {
customresponse = reload(`../../tag/${message.guild.id}.json`);
} catch (err) {
null;
}
try {
if(customresponse[message_content]) { if(customresponse[message_content]) {
let text = customresponse[message_content]; let text = customresponse[message_content];
if (text.includes('[ban]')) { if (text.includes('[ban]')) {
@ -146,6 +153,10 @@ class messageListener extends Listener {
message.channel.send(text); message.channel.send(text);
} }
} catch (err) {
null;
}
} }
} }
} }