Fix the boolean/flags args

This commit is contained in:
Supositware 2022-09-10 09:36:07 +02:00
parent 9dcdf9f188
commit 7c39b62d2c

View file

@ -381,14 +381,11 @@ export default {
else if (type.includes('attachment')) { else if (type.includes('attachment')) {
payload = message.attachments.first(); 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; payload = true;
} }
else {
payload = false;
}
}
args[arg.name] = payload; args[arg.name] = payload;
} }