浏览代码

Added Invite.CreatedAt

pull/7/merge
RogueException 9 年前
父节点
当前提交
b2f742453b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      src/Discord.Net/Models/Invite.cs

+ 3
- 0
src/Discord.Net/Models/Invite.cs 查看文件

@@ -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;


正在加载...
取消
保存