Browse Source

Added Invite.CreatedAt

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

+ 3
- 0
src/Discord.Net/Models/Invite.cs View File

@@ -18,6 +18,7 @@ namespace Discord
public bool IsRevoked { get; private set; } public bool IsRevoked { get; private set; }
/// <summary> If true, a user accepting this invite will be kicked from the server after closing their client. </summary> /// <summary> If true, a user accepting this invite will be kicked from the server after closing their client. </summary>
public bool IsTemporary { get; private set; } public bool IsTemporary { get; private set; }
public DateTime CreatedAt { get; private set; }


/// <summary> Returns a URL for this invite using XkcdCode if available or Id if not. </summary> /// <summary> Returns a URL for this invite using XkcdCode if available or Id if not. </summary>
public string Url => API.Endpoints.InviteUrl(XkcdCode ?? Id); public string Url => API.Endpoints.InviteUrl(XkcdCode ?? Id);
@@ -107,6 +108,8 @@ namespace Discord
MaxUses = model.MaxUses.Value; MaxUses = model.MaxUses.Value;
if (model.Uses != null) if (model.Uses != null)
Uses = model.Uses.Value; Uses = model.Uses.Value;
if (model.CreatedAt != null)
CreatedAt = model.CreatedAt.Value;
} }


public override string ToString() => XkcdCode ?? Id; public override string ToString() => XkcdCode ?? Id;


Loading…
Cancel
Save