From 860398a96784da4b4bfb09d7a10e1fd54b9b439d Mon Sep 17 00:00:00 2001 From: Timotej Rojko <33236065+timotejroiko@users.noreply.github.com> Date: Wed, 3 Feb 2021 19:24:37 +0000 Subject: [PATCH] fix fetching members with presences --- classes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes.js b/classes.js index f27eb19..7d229aa 100644 --- a/classes.js +++ b/classes.js @@ -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; }