This commit is contained in:
Dragon Fire
2021-06-05 23:20:40 -04:00
parent f45a2dd60c
commit 7f28501b47
+2 -2
View File
@@ -1,5 +1,5 @@
const minimist = require('minimist');
const argRegex = /"([^"]*)"|(\b[^]+)/g;
const argRegex = /"([^"]*)"|(\S+)/g;
module.exports = class CommandDispatcher {
constructor(client) {
@@ -56,7 +56,7 @@ module.exports = class CommandDispatcher {
finalResult[arg.key] = parsedArgs;
break;
}
const parsedArg = parsed._[i]?.toString();
const parsedArg = i + 1 === command.args.length ? parsed._.slice(i).join(' ') : parsed._[i]?.toString();
if (arg.isEmpty(parsedArg, msg, arg)) {
if (arg.default === null) {
return `The "${arg.label || arg.key}" argument is required.`;