Added ISelfUser.IsMfaEnabled

This commit is contained in:
RogueException
2016-06-25 00:33:47 -03:00
parent e6879cbe0f
commit febd9636f7
3 changed files with 15 additions and 7 deletions

View File

@@ -10,13 +10,17 @@ namespace Discord.API
public string Username { get; set; }
[JsonProperty("discriminator")]
public string Discriminator { get; set; }
[JsonProperty("avatar")]
public string Avatar { get; set; }
[JsonProperty("verified")]
public bool IsVerified { get; set; }
[JsonProperty("email")]
public string Email { get; set; }
[JsonProperty("bot")]
public bool Bot { get; set; }
[JsonProperty("avatar")]
public string Avatar { get; set; }
//CurrentUser
[JsonProperty("verified")]
public bool Verified { get; set; }
[JsonProperty("email")]
public string Email { get; set; }
[JsonProperty("mfa_enabled")]
public bool MfaEnabled { get; set; }
}
}

View File

@@ -10,6 +10,8 @@ namespace Discord
string Email { get; }
/// <summary> Returns true if this user's email has been verified. </summary>
bool IsVerified { get; }
/// <summary> Returns true if this user has enabled MFA on their account. </summary>
bool IsMfaEnabled { get; }
Task ModifyAsync(Action<ModifyCurrentUserParams> func);
}

View File

@@ -9,6 +9,7 @@ namespace Discord
{
public string Email { get; private set; }
public bool IsVerified { get; private set; }
public bool IsMfaEnabled { get; private set; }
public override DiscordClient Discord { get; }
@@ -24,7 +25,8 @@ namespace Discord
base.Update(model, source);
Email = model.Email;
IsVerified = model.IsVerified;
IsVerified = model.Verified;
IsMfaEnabled = model.MfaEnabled;
}
public async Task UpdateAsync()