Add a little easter egg if the bot detects a message from my girlfriend
This commit is contained in:
parent
22e3be26db
commit
31465f7fd4
7
main.ts
7
main.ts
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user