Browse Source

Merge pull request #52 from 420foxbot/master-user-bot

Add `User.IsBot` field, bump version number to 0.9.1
pull/54/head
RogueException 9 years ago
parent
commit
033ea96204
3 changed files with 8 additions and 1 deletions
  1. +2
    -0
      src/Discord.Net/API/Client/Common/UserReference.cs
  2. +5
    -0
      src/Discord.Net/Models/User.cs
  3. +1
    -1
      src/Discord.Net/project.json

+ 2
- 0
src/Discord.Net/API/Client/Common/UserReference.cs View File

@@ -13,5 +13,7 @@ namespace Discord.API.Client
public ushort? Discriminator { get; set; }
[JsonProperty("avatar")]
public string Avatar { get; set; }
[JsonProperty("bot")]
public bool? Bot { get; set; }
}
}

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

@@ -62,6 +62,8 @@ namespace Discord
public string AvatarId { get; private set; }
/// <summary> Gets the name of the game this user is currently playing. </summary>
public string CurrentGame { get; internal set; }
/// <summary> Determines whether this user is a Bot account. </summary>
public bool IsBot { get; internal set; }
/// <summary> Gets the current status for this user. </summary>
public UserStatus Status { get; internal set; }
/// <summary> Gets the datetime that this user joined this server. </summary>
@@ -160,6 +162,9 @@ namespace Discord
Discriminator = model.Discriminator.Value;
if (model.Avatar != null)
AvatarId = model.Avatar;
if (model.Bot != null)
IsBot = model.Bot.Value;

}
internal void Update(APIMember model)
{


+ 1
- 1
src/Discord.Net/project.json View File

@@ -1,5 +1,5 @@
{
"version": "0.9.0-rc3-3",
"version": "0.9.1",
"description": "An unofficial .Net API wrapper for the Discord client.",
"authors": [
"RogueException"


Loading…
Cancel
Save