bugfix
This commit is contained in:
parent
1722140225
commit
35393aa3ef
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "commandparser",
|
||||
"version": "1.0.13",
|
||||
"version": "1.0.14",
|
||||
"description": "Parser meant to parse commands and their options for discord bots",
|
||||
"main": "build/index.js",
|
||||
"author": "Navy.gif",
|
||||
|
@ -131,10 +131,10 @@ class Parser extends EventEmitter {
|
||||
|
||||
params.splice(index, 1, '');
|
||||
if (aliased) {
|
||||
(args[flag.name] = flag.clone([_flag])).aliased = true;
|
||||
(args[flag.name] = flag.clone([_flag], this.resolver)).aliased = true;
|
||||
currentFlag = null;
|
||||
} else {
|
||||
currentFlag = flag.clone();
|
||||
currentFlag = flag.clone(undefined, this.resolver);
|
||||
args[flag.name] = currentFlag;
|
||||
}
|
||||
index++;
|
||||
@ -169,7 +169,7 @@ class Parser extends EventEmitter {
|
||||
|
||||
this.debug(`Trying ${option.name}, plural: ${option.plural}`);
|
||||
|
||||
const cloned = option.clone();
|
||||
const cloned = option.clone(undefined, this.resolver);
|
||||
let removed: string[] = [],
|
||||
error = false;
|
||||
if (cloned.plural) { // E.g. if the type is CHANNEL**S**, parse out any potential channels from the message
|
||||
@ -220,7 +220,7 @@ class Parser extends EventEmitter {
|
||||
if (strings.length) for (const strOpt of stringOpts) {
|
||||
const val = strings.shift();
|
||||
if (!val) break;
|
||||
const cloned = strOpt.clone([val]);
|
||||
const cloned = strOpt.clone([val], this.resolver);
|
||||
await cloned.parse(guild);
|
||||
args[cloned.name] = cloned;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user