Make booleans be flags

This commit is contained in:
Supositware 2022-09-02 09:18:52 +02:00
parent 59f0f85df4
commit 009f365728

View file

@ -380,6 +380,15 @@ export default {
else if (type.includes('attachment')) {
payload = message.attachments.first();
}
else if (type.includes('boolean')) {
if (messageArgs[i].toLowerCase() === `--${arg.name.toLowerCase()}`) {
payload = true;
}
else {
payload = false;
}
}
args[arg.name] = payload;
}
await command.execute(message, args, client);