Dosen't spam anymore
This commit is contained in:
parent
5cf4c02c9f
commit
4796be772a
1 changed files with 101 additions and 90 deletions
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue