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,13 +381,10 @@ 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('--')) {
payload = true; arg.name = payload.substring(2);
} payload = true;
else {
payload = false;
}
} }
args[arg.name] = payload; args[arg.name] = payload;