1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-23 00:38:47 +00:00

Return DiscordUser, not DiscordGuild, for NormalizeClientAsync

This commit is contained in:
Oliver Booth 2022-07-21 11:36:34 +01:00
parent 4e5f185862
commit 0163c82197
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634

View File

@ -1,4 +1,4 @@
using DSharpPlus;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.Exceptions;
@ -136,7 +136,7 @@ public static class DiscordUserExtensions
/// -or-
/// <para><paramref name="client" /> is <see langword="null" /></para>
/// </exception>
public static async Task<DiscordGuild> NormalizeClientAsync(this DiscordUser user, DiscordClient client)
public static async Task<DiscordUser> NormalizeClientAsync(this DiscordUser user, DiscordClient client)
{
#if NET6_0_OR_GREATER
ArgumentNullException.ThrowIfNull(user);
@ -153,6 +153,6 @@ public static class DiscordUserExtensions
}
#endif
return await client.GetGuildAsync(user.Id);
return await client.GetUserAsync(user.Id);
}
}