Added MfaLevel

This commit is contained in:
RogueException
2016-06-24 23:37:40 -03:00
parent d9802e9067
commit 11c9b61495
3 changed files with 16 additions and 2 deletions

View File

@@ -34,5 +34,7 @@ namespace Discord.API
public Emoji[] Emojis { get; set; }
[JsonProperty("features")]
public string[] Features { get; set; }
[JsonProperty("mfa_level")]
public MfaLevel MfaLevel { get; set; }
}
}

View File

@@ -23,12 +23,13 @@ namespace Discord
public int AFKTimeout { get; private set; }
public bool IsEmbeddable { get; private set; }
public VerificationLevel VerificationLevel { get; private set; }
public MfaLevel MfaLevel { get; private set; }
public override DiscordClient Discord { get; }
public ulong? AFKChannelId { get; private set; }
public ulong? EmbedChannelId { get; private set; }
public ulong OwnerId { get; private set; }
public string VoiceRegionId { get; private set; }
public override DiscordClient Discord { get; }
public ImmutableArray<Emoji> Emojis { get; protected set; }
public ImmutableArray<string> Features { get; protected set; }
@@ -60,7 +61,8 @@ namespace Discord
VoiceRegionId = model.Region;
_splashId = model.Splash;
VerificationLevel = model.VerificationLevel;
MfaLevel = model.MfaLevel;
if (model.Emojis != null)
{
var emojis = ImmutableArray.CreateBuilder<Emoji>(model.Emojis.Length);

View File

@@ -0,0 +1,10 @@
namespace Discord
{
public enum MfaLevel
{
/// <summary> Users have no additional MFA restriction on this guild. </summary>
Disabled = 0,
/// <summary> Users must have MFA enabled on their account to perform administrative actions. </summary>
Enabled = 1
}
}