Make booleans be flags
This commit is contained in:
parent
59f0f85df4
commit
009f365728
1 changed files with 9 additions and 0 deletions
|
@ -380,6 +380,15 @@ 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()}`) {
|
||||||
|
payload = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
payload = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
args[arg.name] = payload;
|
args[arg.name] = payload;
|
||||||
}
|
}
|
||||||
await command.execute(message, args, client);
|
await command.execute(message, args, client);
|
||||||
|
|
Loading…
Reference in a new issue