issue in question is caused by the following block of code
App.js, line 213
// Find whether or not the requested command exists
var cmd = null;
var userInputCommand = argv._[0];
for (var name in this.commands) {
var command = this.commands[name];
var validCommandName = command.caseSensitive ? name : name.toLowerCase();
var validUserInput = command.caseSensitive ? userInputCommand : userInputCommand.toLowerCase();
if (validCommandName === validUserInput) {
cmd = command;
break;
}
}
When doing something like "!prefix --help" while a registered command has caseSensitive set to false, userInputCommand is undefined, as argv._ has nothing inside of it. When the loop reaches the command where the caseSensitive flag is set, it tries to do .toLowerCase() on an undefined value, causing the error.
issue in question is caused by the following block of code
App.js, line 213
When doing something like "!prefix --help" while a registered command has caseSensitive set to false, userInputCommand is undefined, as argv._ has nothing inside of it. When the loop reaches the command where the caseSensitive flag is set, it tries to do .toLowerCase() on an undefined value, causing the error.