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

master
Chloe Fontenot 🏳️‍⚧️ 2023-04-04 13:05:18 +07:00
parent 22e3be26db
commit 31465f7fd4
1 changed files with 7 additions and 0 deletions

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