-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Members type returning only 1 member #190
Comments
No cached members |
welp, is there a solution for this? |
use |
aight |
didn't work |
[ArgumentTypes.MEMBERS]: async (message, phrase) => {
if (!phrase) return null;
const members = this.client.util.resolveMembers(phrase, await message.guild.members.fetch());
return members.size ? members : null;
}, I edited the code |
I have it set in the prefix configuration of the Handler command and it works well for me // ......
.prefix: async (message: Message) => {
if (message.guild.members.cache.size !== message.guild.memberCount) {
try {
await message.guild.members.fetch();
} catch (error) {
this.logger.error(error);
}
}
return prefix;
} |
and that code won't work. So I think it's a problem with the resolveMembers function. Haven't checked that out yet. |
It works because if the member counter is different from the cached member counter, then it will make a call to get the members, and since this function runs before executing a command, the command will know which user you have selected because it will already be cached |
aight |
So I am trying to make a command with multiple arguments. And when I try it with matches and without matches is still returns 1 member out of 3.
None of these are working... Any reason why?
The text was updated successfully, but these errors were encountered: