Browse Source

Added VerificationLevel enum

pull/108/head
RogueException 9 years ago
parent
commit
3276b2f03e
4 changed files with 18 additions and 3 deletions
  1. +1
    -1
      src/Discord.Net/API/Common/Guild.cs
  2. +1
    -1
      src/Discord.Net/Entities/Guilds/Guild.cs
  3. +2
    -1
      src/Discord.Net/Entities/Guilds/IGuild.cs
  4. +14
    -0
      src/Discord.Net/Entities/Guilds/VerificationLevel.cs

+ 1
- 1
src/Discord.Net/API/Common/Guild.cs View File

@@ -25,7 +25,7 @@ namespace Discord.API
[JsonProperty("embed_channel_id")]
public ulong? EmbedChannelId { get; set; }
[JsonProperty("verification_level")]
public int VerificationLevel { get; set; }
public VerificationLevel VerificationLevel { get; set; }
[JsonProperty("voice_states")]
public VoiceState[] VoiceStates { get; set; }
[JsonProperty("roles")]


+ 1
- 1
src/Discord.Net/Entities/Guilds/Guild.cs View File

@@ -22,7 +22,7 @@ namespace Discord
public string Name { get; private set; }
public int AFKTimeout { get; private set; }
public bool IsEmbeddable { get; private set; }
public int VerificationLevel { get; private set; }
public VerificationLevel VerificationLevel { get; private set; }

public ulong? AFKChannelId { get; private set; }
public ulong? EmbedChannelId { get; private set; }


+ 2
- 1
src/Discord.Net/Entities/Guilds/IGuild.cs View File

@@ -13,7 +13,8 @@ namespace Discord
int AFKTimeout { get; }
/// <summary> Returns true if this guild is embeddable (e.g. widget) </summary>
bool IsEmbeddable { get; }
int VerificationLevel { get; }
/// <summary> Gets the level of requirements a user must fulfill before being allowed to post messages in this guild. </summary>
VerificationLevel VerificationLevel { get; }
/// <summary> Returns the url to this guild's icon, or null if one is not set. </summary>
string IconUrl { get; }
/// <summary> Returns the url to this guild's splash image, or null if one is not set. </summary>


+ 14
- 0
src/Discord.Net/Entities/Guilds/VerificationLevel.cs View File

@@ -0,0 +1,14 @@
namespace Discord
{
public enum VerificationLevel
{
/// <summary> Users have no additional restrictions on sending messages to this guild. </summary>
None = 0,
/// <summary> Users must have a verified email on their account. </summary>
Low = 1,
/// <summary> Users must fulfill the requirements of Low, and be registered on Discord for at least 5 minutes. </summary>
Medium = 2,
/// <summary> Users must fulfill the requirements of Medium, and be a member of this guild for at least 10 minutes. </summary>
High = 3
}
}

Loading…
Cancel
Save