Added MfaLevel
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
10
src/Discord.Net/Entities/Guilds/MfaLevel.cs
Normal file
10
src/Discord.Net/Entities/Guilds/MfaLevel.cs
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user