added /forceevaluate

master
Chloe Fontenot 🏳️‍⚧️ 2023-04-09 22:39:21 +07:00
parent b71789d7de
commit c770cd3f47
1 changed files with 12 additions and 11 deletions

@ -120,25 +120,26 @@ client.on('messageCreate', message => {
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. 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); madlibNextMessage(message.content, client);
} }
checkMessage(message); checkMessage(message, false);
}); });
client.on('messageUpdate', (undefined, newMessage) => { client.on('messageUpdate', (undefined, newMessage) => {
checkMessage(newMessage); checkMessage(newMessage, false);
}); });
global.checkMessage = function checkMessage(message) { global.checkMessage = function checkMessage(message, ranFromGlobal) {
checkInsult(message); if (!runFromGlobal) {
if (message.content == "<@1091120267851485215>, what are your pronouns?") { checkInsult(message);
message.reply({ content: "My pronouns are she/her ☺️", allowedMentions: { repliedUser: false } }) if (message.content == "<@1091120267851485215>, what are your pronouns?") {
message.reply({ content: "My pronouns are she/her ☺️", allowedMentions: { repliedUser: false } })
}
if (message.author.id == "1091120267851485215") {
return;
}
console.log(`${message.author.tag} in #${message.channel.name} sent: ${message.content}`);
} }
console.log(`${message.author.tag} in #${message.channel.name} sent: ${message.content}`);
//console.log(message.author); //console.log(message.author);
if (message.author.id == "1091120267851485215") {
return;
}
var matchMessageArray = message.content.toLowerCase().split(/[ ,!?\"@#$%^&*().;:|]+/); var matchMessageArray = message.content.toLowerCase().split(/[ ,!?\"@#$%^&*().;:|]+/);
console.log(matchMessageArray); console.log(matchMessageArray);