make sure messages are defined

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2024-08-06 11:52:19 -05:00
parent a24a19400e
commit 1167324033

View File

@ -135,13 +135,19 @@ client.on('messageCreate', message => {
madlibNextMessage(message.content, client); madlibNextMessage(message.content, client);
} }
//checkMessage(message, false); //checkMessage(message, false);
colonThree(message); if (message != undefined) {
tylerStop(message); colonThree(message);
tylerStop(message);
}
}); });
client.on('messageUpdate', (undefined, newMessage) => { client.on('messageUpdate', (undefined, newMessage) => {
//checkMessage(newMessage, false); //checkMessage(newMessage, false);
if (message != undefined) {
colonThree(message);
tylerStop(message); tylerStop(message);
}
}); });
function getMatchingPhrase(inputString, targetCharacter) { function getMatchingPhrase(inputString, targetCharacter) {