fix case sensitivity

This commit is contained in:
Skylar Grant 2021-09-22 17:14:14 -04:00
parent e733217fca
commit 8ccf736aa2
2 changed files with 4 additions and 3 deletions

View File

@ -138,7 +138,7 @@ const functions = {
return commandData; return commandData;
} }
commandData.isCommand = true; 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.command = message.content.slice(finalPeriod).replace('.','').toLowerCase();
commandData.author = `${message.author.username}#${message.author.discriminator}`; commandData.author = `${message.author.username}#${message.author.discriminator}`;
return this.checkCommand(commandData); return this.checkCommand(commandData);

View File

@ -184,8 +184,9 @@ client.on('messageCreate', message => {
if (message.author.bot) return; if (message.author.bot) return;
// Wildcard Responses, will respond if any message contains the trigger word(s), excluding self-messages // 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.'); const lowerContent = message.content.toLowerCase();
if (message.content.includes('ligma')) message.reply('ligma balls, goteem'); 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); const commandData = fn.dot.getCommandData(message);
console.log(commandData); console.log(commandData);