From 3a4cc92c30a0940c8f59e28d991481734065c582 Mon Sep 17 00:00:00 2001 From: Brandon Smith Date: Fri, 21 Aug 2015 18:31:14 -0300 Subject: [PATCH] Added User documentation --- src/Discord.Net/User.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net/User.cs b/src/Discord.Net/User.cs index 981766342..c9b5e484e 100644 --- a/src/Discord.Net/User.cs +++ b/src/Discord.Net/User.cs @@ -8,20 +8,36 @@ namespace Discord { private readonly DiscordClient _client; + /// Returns the unique identifier for this user. public string Id { get; } + /// Returns the name of this channel. public string Name { get; internal set; } + /// Returns the unique identifier for this user's current avatar. public string AvatarId { get; internal set; } + /// Returns the URL to this user's current avatar. public string AvatarUrl => Endpoints.UserAvatar(Id, AvatarId); + /// Returns a by-name unique identifier separating this user from others with the same name. public string Discriminator { get; internal set; } [JsonIgnore] + /// Returns the email for this user. + /// This field is only ever populated for the current logged in user. public string Email { get; internal set; } [JsonIgnore] - public bool IsVerified { get; internal set; } = true; + /// Returns if the email for this user has been verified. + /// This field is only ever populated for the current logged in user. + public bool IsVerified { get; internal set; } + /// Returns the id for the game this user is currently playing. public string GameId { get; internal set; } + /// Returns the current status for this user. public string Status { get; internal set; } + + /// Returns the string "<@Id>" to be used as a shortcut when including mentions in text. public string Mention { get { return $"<@{Id}>"; } } + //TODO: Add voice + /// Returns the time this user last sent a message. + /// Is not currently affected by voice activity public DateTime LastActivity { get; private set; } internal User(string id, DiscordClient client) @@ -29,6 +45,7 @@ namespace Discord Id = id; _client = client; LastActivity = DateTime.UtcNow; + IsVerified = true; } internal void UpdateActivity(DateTime activity)