From 7f28501b472f8fd2cc39953dfb7e8f17cc465358 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 5 Jun 2021 23:20:40 -0400 Subject: [PATCH] Fix --- framework/Dispatcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/Dispatcher.js b/framework/Dispatcher.js index 648f1445..9c6d7416 100644 --- a/framework/Dispatcher.js +++ b/framework/Dispatcher.js @@ -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.`;