Add a little easter egg if the bot detects a message from my girlfriend

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2023-04-04 13:05:18 -05:00
parent 22e3be26db
commit 31465f7fd4

View File

@ -131,6 +131,7 @@ function checkMessage(message) {
//console.log("Corrected Message: " + correctedMessage); //console.log("Corrected Message: " + correctedMessage);
if (abbreviationKey.target_phrases[matchMessageArray[i]] !== undefined) { if (abbreviationKey.target_phrases[matchMessageArray[i]] !== undefined) {
checkIfGirlfriend(message);
if (checkIfExempt(message)) { if (checkIfExempt(message)) {
return; return;
} }
@ -170,6 +171,12 @@ function checkMessage(message) {
} }
} }
function checkIfGirlfriend(message) {
if (message.author.id == "698360641731166238") {
message.react('☺️');
message.react('❤️');
}
}
function checkIfExempt(message) { function checkIfExempt(message) {
console.log("Has role? " + message.member.roles.cache.some(role => role.name == "Exempt from NoMoreAcronyms")); console.log("Has role? " + message.member.roles.cache.some(role => role.name == "Exempt from NoMoreAcronyms"));
if (!message.author.bot) { if (!message.author.bot) {