Skip to content

Commit

Permalink
fix fetching members with presences
Browse files Browse the repository at this point in the history
  • Loading branch information
timotejroiko committed Feb 3, 2021
1 parent 586dd84 commit 860398a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,13 +644,13 @@ Discord.GuildMemberManager.prototype.fetch = async function(id, cache) {
j(new Discord.DiscordAPIError("GUILD_MEMBERS_CHUNK", { message: "Unknown User" }, "Gateway"));
return;
}
if(this.cache.has(user_ids)) {
if(this.cache.has(user_ids) && (!presences || this.client.options.cachePresences) && !options.force) {
r(this.cache.get(user_ids));
return;
}
}
if(Array.isArray(user_ids)) {
if(user_ids.every(t => this.cache.has(t))) {
if(user_ids.every(t => this.cache.has(t)) && (!presences || this.client.options.cachePresences) && !options.force) {
r(user_ids.map(t => this.cache.get(t)));
return;
}
Expand Down

0 comments on commit 860398a

Please sign in to comment.