mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
fix(GuildMember): mark joined as nullable and fix fetching for these cases
This commit is contained in:
@@ -178,7 +178,7 @@ class GuildMemberStore extends DataStore {
|
||||
|
||||
_fetchSingle({ user, cache }) {
|
||||
const existing = this.get(user);
|
||||
if (existing) return Promise.resolve(existing);
|
||||
if (existing && existing.joinedTimestamp) return Promise.resolve(existing);
|
||||
return this.client.api.guilds(this.guild.id).members(user).get()
|
||||
.then(data => this.add(data, cache));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user