fix case sensitivity
This commit is contained in:
parent
e733217fca
commit
8ccf736aa2
@ -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);
|
||||||
|
5
main.js
5
main.js
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user