[Refactor] Extract GetDisplayAvatarUrl in IUser (#2771)

* Implement `GetDisplayAvatarUrl` method

* Remove obsolete example

* Update XML documentation

---------

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
This commit is contained in:
zobweyt
2023-11-18 23:50:17 +03:00
committed by GitHub
parent ac274d4b76
commit b1787d8334
10 changed files with 48 additions and 69 deletions

View File

@@ -8,16 +8,6 @@ namespace Discord.Net.Examples.Core.Entities.Users
[PublicAPI]
internal class UserExamples
{
#region GetAvatarUrl
public async Task GetAvatarAsync(IUser user, ITextChannel textChannel)
{
var userAvatarUrl = user.GetAvatarUrl() ?? user.GetDefaultAvatarUrl();
await textChannel.SendMessageAsync(userAvatarUrl);
}
#endregion
#region CreateDMChannelAsync
public async Task MessageUserAsync(IUser user)