From 11673240333e8f31621affd441a19356e2a0b7a3 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Tue, 6 Aug 2024 11:52:19 -0500 Subject: [PATCH] make sure messages are defined --- main.cjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.cjs b/main.cjs index 75a8cb1..319ada7 100644 --- a/main.cjs +++ b/main.cjs @@ -135,13 +135,19 @@ client.on('messageCreate', message => { madlibNextMessage(message.content, client); } //checkMessage(message, false); - colonThree(message); - tylerStop(message); + if (message != undefined) { + colonThree(message); + tylerStop(message); + } + }); client.on('messageUpdate', (undefined, newMessage) => { //checkMessage(newMessage, false); + if (message != undefined) { + colonThree(message); tylerStop(message); + } }); function getMatchingPhrase(inputString, targetCharacter) {