From 999282bc9f40497b6664a10d93bafe1f083481fb Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Sat, 1 Apr 2023 18:41:35 -0500 Subject: [PATCH] Execute on message edit --- main.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.ts b/main.ts index c5d7d57..cf6fe5c 100644 --- a/main.ts +++ b/main.ts @@ -103,6 +103,14 @@ function replyMessage(message, correctedMessage, abbrsUsed) { } client.on('messageCreate', message => { + checkMessage(message); +}); + +client.on('messageEdit', message => { + checkMessage(message); +}); + +function checkMessage(message) { console.log(`${message.author.tag} in #${message.channel.name} sent: ${message.content}`); if (message.author.bot) { //console.log(message.author); @@ -155,5 +163,4 @@ client.on('messageCreate', message => { replyMessage(message, correctedMessage, abbrsUsed); } -} -); +} \ No newline at end of file