From 009f365728660a4f13e3325739b468e3f68914ae Mon Sep 17 00:00:00 2001 From: Supositware Date: Fri, 2 Sep 2022 09:18:52 +0200 Subject: [PATCH] Make booleans be flags --- events/client/messageCreate.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/events/client/messageCreate.js b/events/client/messageCreate.js index c382e2c6..5dd668de 100644 --- a/events/client/messageCreate.js +++ b/events/client/messageCreate.js @@ -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);