From e52c49175b4cf0bc560d47820fb95804a9e6a2fb Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Sun, 2 Apr 2023 18:56:10 -0500 Subject: [PATCH] Added checkInsult() --- main.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.ts b/main.ts index 69657ae..8006c48 100644 --- a/main.ts +++ b/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('🇺'); + } + } \ No newline at end of file