Fix anything triggering boolean options in commands
This commit is contained in:
parent
fd7ca30e1c
commit
3464736d85
1 changed files with 5 additions and 2 deletions
|
@ -411,13 +411,16 @@ export default {
|
|||
payload = messageArgs.slice(i).join(' ');
|
||||
}
|
||||
|
||||
if (messageArgs[i].startsWith('--')) {
|
||||
if (arg.type === ApplicationCommandOptionType.Boolean && !messageArgs[i].startsWith('--')) {
|
||||
continue;
|
||||
}
|
||||
else if (messageArgs[i].startsWith('--')) {
|
||||
payloadName = payload.substring(2);
|
||||
payload = true;
|
||||
j--;
|
||||
}
|
||||
|
||||
if (arg.type === ApplicationCommandOptionType.Mentionable) {
|
||||
if (arg.type === ApplicationCommandOptionType.Mentionable || arg.type === ApplicationCommandOptionType.User) {
|
||||
await message.guild.members.fetch();
|
||||
payload = message.mentions.members.first() ? message.mentions.members.first() : message.guild.members.cache.find(u => u.user.username.toLowerCase().includes(payload.toLowerCase()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue