committed by
Christopher F
parent
93878e4a90
commit
033d31294f
@@ -142,9 +142,14 @@ namespace Discord.Rest
|
|||||||
public static async Task<RestGuildUser> GetGuildUserAsync(BaseDiscordClient client,
|
public static async Task<RestGuildUser> GetGuildUserAsync(BaseDiscordClient client,
|
||||||
ulong guildId, ulong id, RequestOptions options)
|
ulong guildId, ulong id, RequestOptions options)
|
||||||
{
|
{
|
||||||
|
var guild = await GetGuildAsync(client, guildId, options).ConfigureAwait(false);
|
||||||
|
if (guild == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
var model = await client.ApiClient.GetGuildMemberAsync(guildId, id, options).ConfigureAwait(false);
|
var model = await client.ApiClient.GetGuildMemberAsync(guildId, id, options).ConfigureAwait(false);
|
||||||
if (model != null)
|
if (model != null)
|
||||||
return RestGuildUser.Create(client, new RestGuild(client, guildId), model);
|
return RestGuildUser.Create(client, guild, model);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user