Fix the boolean/flags args
This commit is contained in:
parent
9dcdf9f188
commit
7c39b62d2c
1 changed files with 4 additions and 7 deletions
|
@ -381,14 +381,11 @@ export default {
|
|||
else if (type.includes('attachment')) {
|
||||
payload = message.attachments.first();
|
||||
}
|
||||
else if (type.includes('boolean')) {
|
||||
if (messageArgs[i].toLowerCase() === `--${arg.name.toLowerCase()}`) {
|
||||
|
||||
if (payload.startsWith('--')) {
|
||||
arg.name = payload.substring(2);
|
||||
payload = true;
|
||||
}
|
||||
else {
|
||||
payload = false;
|
||||
}
|
||||
}
|
||||
|
||||
args[arg.name] = payload;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue