Actually fix command flags?

This commit is contained in:
Supositware 2022-09-12 11:36:51 +02:00
parent b637a73a85
commit 1eb3b8a013

View file

@ -375,16 +375,17 @@ export default {
const arg = command.data.options[i];
const type = arg.constructor.name.toLowerCase();
let payload = messageArgs[i];
if (type.includes('mentionable')) {
if (payload.startsWith('--')) {
arg.name = payload.substring(2);
payload = true;
}
else if (type.includes('mentionable')) {
payload = message.mentions.members.first();
}
else if (type.includes('attachment')) {
payload = message.attachments.first();
}
else if (payload.startsWith('--')) {
arg.name = payload.substring(2);
payload = true;
}
args[arg.name] = payload;
}