@ -14,7 +14,7 @@ var triggeredByMaci = false;
global . tylerStop = function tylerStop ( message ) {
global . tylerStop = function tylerStop ( message ) {
if ( ! message . author . bot && message . author . id == "205475706296205312" && message . content . toLowerCase ( ) . includes ( 'idiot' ) ) {
if ( ! message . author . bot && message . author . id == "205475706296205312" && message . content . toLowerCase ( ) . includes ( 'idiot' ) ) {
message . react ( '<:amgery:1072270900675739758>' ) ;
message . react ( '<:amgery:1072270900675739758>' ) ;
message . reply ( "C aleb has specifcially asked you multiple times to stop calling yourself an idiot.") ;
message . reply ( "C hloe has specifcially asked you multiple times to stop calling yourself an idiot.") ;
}
}
}
}
@ -120,7 +120,7 @@ function replyMessage(message, correctedMessage, abbrsUsed) {
} else {
} else {
plural = abbrsUsed + " acronyms"
plural = abbrsUsed + " acronyms"
}
}
replyString += "Your message contains " + plural + "! Let me fix that for you: \n" + " \|\|btw I was written by C aleb Fontenot\|\| \n \n" + blockQuote ( correctedMessage ) ;
replyString += "Your message contains " + plural + "! Let me fix that for you: \n" + " \|\|btw I was written by C hloe Fontenot\|\| \n \n" + blockQuote ( correctedMessage ) ;
var stringLength = replyString . length ;
var stringLength = replyString . length ;
if ( stringLength > 2000 ) {
if ( stringLength > 2000 ) {
@ -135,6 +135,7 @@ client.on('messageCreate', message => {
madlibNextMessage ( message . content , client ) ;
madlibNextMessage ( message . content , client ) ;
}
}
checkMessage ( message , false ) ;
checkMessage ( message , false ) ;
colonThree ( message ) ;
} ) ;
} ) ;
client . on ( 'messageUpdate' , ( undefined , newMessage ) => {
client . on ( 'messageUpdate' , ( undefined , newMessage ) => {
@ -156,6 +157,14 @@ function getMatchingPhrase(inputString, targetCharacter) {
}
}
return matchingPhrase ;
return matchingPhrase ;
}
}
global . colonThree = function colonThree ( message ) {
if ( message . channel . id == "1253947401191034940" && message . content . endsWith ( ":3" ) {
message . reply ( "Your message does not end in :3." ) ;
message . delete ( ) ;
}
}
/ *
/ *
Main bot logic . Check for abbreviations by splitting the message at any non - word characters , then if we find a match , create a new array , replace the abbreviation with the phrase , then call replyMessage ( ) and reply to the original message with the corrected one .
Main bot logic . Check for abbreviations by splitting the message at any non - word characters , then if we find a match , create a new array , replace the abbreviation with the phrase , then call replyMessage ( ) and reply to the original message with the corrected one .
* /
* /
@ -204,7 +213,7 @@ global.checkMessage = function checkMessage(message, runFromGlobal) {
rebuildMessageArray = correctedMessage . split ( regex ) ;
rebuildMessageArray = correctedMessage . split ( regex ) ;
console . log ( "rebuildMessageArray: " , rebuildMessageArray ) ;
console . log ( "rebuildMessageArray: " , rebuildMessageArray ) ;
} else {
} else {
message . reply ( "Detected abbreviation, but regex matching broke. C aleb is working on this...") ;
message . reply ( "Detected abbreviation, but regex matching broke. C hloe is working on this...") ;
return ;
return ;
}
}
//https://gitea.calebfontenot.com/CCF_100/NoMoreAcronyms/issues/1
//https://gitea.calebfontenot.com/CCF_100/NoMoreAcronyms/issues/1