From 8ccf736aa238620ac870593d6870e3ad3319ff0b Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Wed, 22 Sep 2021 17:14:14 -0400 Subject: [PATCH] fix case sensitivity --- functions.js | 2 +- main.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/functions.js b/functions.js index 2214173..126f583 100644 --- a/functions.js +++ b/functions.js @@ -138,7 +138,7 @@ const functions = { return commandData; } commandData.isCommand = true; - commandData.args = message.content.slice(0,finalPeriod); + commandData.args = message.content.slice(0,finalPeriod).toLowerCase(); commandData.command = message.content.slice(finalPeriod).replace('.','').toLowerCase(); commandData.author = `${message.author.username}#${message.author.discriminator}`; return this.checkCommand(commandData); diff --git a/main.js b/main.js index b4e28c6..7c235b5 100644 --- a/main.js +++ b/main.js @@ -184,8 +184,9 @@ client.on('messageCreate', message => { if (message.author.bot) return; // Wildcard Responses, will respond if any message contains the trigger word(s), excluding self-messages - if (message.content.includes('big') && message.content.includes('doinks')) message.reply('gang.'); - if (message.content.includes('ligma')) message.reply('ligma balls, goteem'); + const lowerContent = message.content.toLowerCase(); + if (lowerContent.includes('big') && lowerContent.includes('doinks')) message.reply('gang.'); + if (lowerContent.includes('ligma')) message.reply('ligma balls, goteem'); const commandData = fn.dot.getCommandData(message); console.log(commandData);