Browse Source

User.AvatarUrl returns null if AvatarId is null

tags/docs-0.9
RogueException 9 years ago
parent
commit
f377249d54
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net/Models/User.cs

+ 1
- 1
src/Discord.Net/Models/User.cs View File

@@ -24,7 +24,7 @@ namespace Discord
/// <summary> Returns the unique identifier for this user's current avatar. </summary> /// <summary> Returns the unique identifier for this user's current avatar. </summary>
public string AvatarId { get; private set; } public string AvatarId { get; private set; }
/// <summary> Returns the URL to this user's current avatar. </summary> /// <summary> Returns the URL to this user's current avatar. </summary>
public string AvatarUrl => API.Endpoints.UserAvatar(Id, AvatarId);
public string AvatarUrl => AvatarId != null ? API.Endpoints.UserAvatar(Id, AvatarId) : null;
/// <summary> Returns the datetime that this user joined this server. </summary> /// <summary> Returns the datetime that this user joined this server. </summary>
public DateTime JoinedAt { get; private set; } public DateTime JoinedAt { get; private set; }




Loading…
Cancel
Save