Added checkInsult()
This commit is contained in:
parent
81bdab6bbc
commit
e52c49175b
11
main.ts
11
main.ts
@ -104,10 +104,12 @@ function replyMessage(message, correctedMessage, abbrsUsed) {
|
||||
|
||||
client.on('messageCreate', message => {
|
||||
checkMessage(message);
|
||||
checkInsult(message);
|
||||
});
|
||||
|
||||
client.on('messageUpdate', (undefined, newMessage) => {
|
||||
checkMessage(newMessage);
|
||||
checkInsult(newMessage);
|
||||
});
|
||||
|
||||
function checkMessage(message) {
|
||||
@ -172,4 +174,13 @@ function checkMessage(message) {
|
||||
replyMessage(message, correctedMessage, abbrsUsed);
|
||||
}
|
||||
|
||||
}
|
||||
function checkInsult(message) {
|
||||
if (message.content.includes("bot", "annoying") || message.content.includes("bad")) {
|
||||
message.react('🇳');
|
||||
message.react('🇴');
|
||||
message.react('❌');
|
||||
message.react('🇺');
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user