mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix arg parsing for flags
This commit is contained in:
@@ -42,7 +42,7 @@ module.exports = class CommandDispatcher {
|
||||
}
|
||||
const content = msg.content.replace(this.commandPattern, '').trim();
|
||||
const result = (content.match(argRegex) || []).map(m => m.replace(argRegex, '$1$2'));
|
||||
const parsed = minimist(result);
|
||||
const parsed = minimist(result, { boolean: true });
|
||||
const finalResult = { flags: parsed };
|
||||
for (let i = 0; i < command.args.length; i++) {
|
||||
const arg = command.args[i];
|
||||
|
||||
Reference in New Issue
Block a user