mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 22:32:50 +02:00
Fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
const minimist = require('minimist');
|
const minimist = require('minimist');
|
||||||
const argRegex = /"([^"]*)"|(\b[^]+)/g;
|
const argRegex = /"([^"]*)"|(\S+)/g;
|
||||||
|
|
||||||
module.exports = class CommandDispatcher {
|
module.exports = class CommandDispatcher {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -56,7 +56,7 @@ module.exports = class CommandDispatcher {
|
|||||||
finalResult[arg.key] = parsedArgs;
|
finalResult[arg.key] = parsedArgs;
|
||||||
break;
|
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.isEmpty(parsedArg, msg, arg)) {
|
||||||
if (arg.default === null) {
|
if (arg.default === null) {
|
||||||
return `The "${arg.label || arg.key}" argument is required.`;
|
return `The "${arg.label || arg.key}" argument is required.`;
|
||||||
|
|||||||
Reference in New Issue
Block a user