added UserDefaultAvatar to IUser (#973)
* added UserDefaultAvatar to IUser * pass ushort as discriminator * removed unneeded ushort.parse
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using Model = Discord.API.User;
|
||||
@@ -60,6 +60,9 @@ namespace Discord.Rest
|
||||
public string GetAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
|
||||
=> CDN.GetUserAvatarUrl(Id, AvatarId, size, format);
|
||||
|
||||
public string GetDefaultAvatarUrl()
|
||||
=> CDN.GetDefaultUserAvatarUrl(DiscriminatorValue);
|
||||
|
||||
public override string ToString() => $"{Username}#{Discriminator}";
|
||||
private string DebuggerDisplay => $"{Username}#{Discriminator} ({Id}{(IsBot ? ", Bot" : "")})";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user