Actually fix command flags?
This commit is contained in:
parent
b637a73a85
commit
1eb3b8a013
1 changed files with 6 additions and 5 deletions
|
@ -375,16 +375,17 @@ export default {
|
||||||
const arg = command.data.options[i];
|
const arg = command.data.options[i];
|
||||||
const type = arg.constructor.name.toLowerCase();
|
const type = arg.constructor.name.toLowerCase();
|
||||||
let payload = messageArgs[i];
|
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();
|
payload = message.mentions.members.first();
|
||||||
}
|
}
|
||||||
else if (type.includes('attachment')) {
|
else if (type.includes('attachment')) {
|
||||||
payload = message.attachments.first();
|
payload = message.attachments.first();
|
||||||
}
|
}
|
||||||
else if (payload.startsWith('--')) {
|
|
||||||
arg.name = payload.substring(2);
|
|
||||||
payload = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
args[arg.name] = payload;
|
args[arg.name] = payload;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue