Added Invite.CreatedAt

This commit is contained in:
RogueException
2015-10-29 15:09:03 -03:00
parent c0cde7ff5c
commit b2f742453b

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;