mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-14 04:15:41 +00:00
Return DiscordUser, not DiscordGuild, for NormalizeClientAsync
This commit is contained in:
parent
4e5f185862
commit
0163c82197
@ -1,4 +1,4 @@
|
|||||||
using DSharpPlus;
|
using DSharpPlus;
|
||||||
using DSharpPlus.Entities;
|
using DSharpPlus.Entities;
|
||||||
using DSharpPlus.Exceptions;
|
using DSharpPlus.Exceptions;
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ public static class DiscordUserExtensions
|
|||||||
/// -or-
|
/// -or-
|
||||||
/// <para><paramref name="client" /> is <see langword="null" /></para>
|
/// <para><paramref name="client" /> is <see langword="null" /></para>
|
||||||
/// </exception>
|
/// </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
|
#if NET6_0_OR_GREATER
|
||||||
ArgumentNullException.ThrowIfNull(user);
|
ArgumentNullException.ThrowIfNull(user);
|
||||||
@ -153,6 +153,6 @@ public static class DiscordUserExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return await client.GetGuildAsync(user.Id);
|
return await client.GetUserAsync(user.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user