mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
fix(Guild): allow fetchMember to be used with an uncached user (#3333)
This commit is contained in:
@@ -499,8 +499,8 @@ class RESTMethods {
|
||||
.then(data => this.client.actions.GuildMemberGet.handle(guild, data).member);
|
||||
}
|
||||
|
||||
getGuildMember(guild, user, cache) {
|
||||
return this.rest.makeRequest('get', Endpoints.Guild(guild).Member(user.id), true).then(data => {
|
||||
getGuildMember(guild, userID, cache) {
|
||||
return this.rest.makeRequest('get', Endpoints.Guild(guild).Member(userID), true).then(data => {
|
||||
if (cache) return this.client.actions.GuildMemberGet.handle(guild, data).member;
|
||||
else return new GuildMember(guild, data);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user