This commit is contained in:
Dragon Fire
2021-06-05 18:47:34 -04:00
parent 7b6be3159e
commit bf6334496b
+1 -1
View File
@@ -56,7 +56,7 @@ module.exports = class CommandDispatcher {
finalResult[arg.key] = parsedArgs;
break;
}
const parsedArg = parsed._[i].toString();
const parsedArg = parsed._[i]?.toString();
if (arg.isEmpty(parsedArg, msg, arg)) {
if (arg.default) {
finalResult[arg.key] = typeof arg.default === 'function' ? arg.default(msg) : arg.default;