@ -131,6 +131,9 @@ function replyMessage(message, correctedMessage, abbrsUsed) {
}
client . on ( 'messageCreate' , message => {
if ( message . author . id == "1091120267851485215" ) {
return ;
}
if ( global . madlibState . gameChannel == message . channel . id && message . author . id != "1091120267851485215" ) { // Pass message to madlib game handler if message was sent in the active game channel.
madlibNextMessage ( message . content , client ) ;
}
@ -138,6 +141,7 @@ client.on('messageCreate', message => {
if ( message != undefined ) {
colonThree ( message ) ;
tylerStop ( message ) ;
clenseDegeneracy ( message ) ;
}
} ) ;
@ -147,6 +151,7 @@ client.on('messageUpdate', (undefined, newMessage) => {
if ( message != undefined ) {
colonThree ( message ) ;
tylerStop ( message ) ;
clenseDegeneracy ( message ) ;
}
} ) ;
@ -166,9 +171,7 @@ function getMatchingPhrase(inputString, targetCharacter) {
}
global . colonThree = function colonThree ( message ) {
if ( message . author . id == "1091120267851485215" ) {
return ;
}
if ( message . channel . id == "1253947401191034940" && ! message . content . endsWith ( ":3" ) ) {
const channel = client . channels . cache . get ( message . channel . id ) ;
channel . send ( "Your message does not end in :3." ) ;
@ -176,6 +179,11 @@ function getMatchingPhrase(inputString, targetCharacter) {
}
}
global . clenseDegeneracy = function clenseDegeneracy ( message ) {
if ( message . content . contains ( "ussy" ) {
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 .
* /