diff --git a/src/Discord.Net/API/Common/Guild.cs b/src/Discord.Net/API/Common/Guild.cs index b4dfcdc11..e71a1b81b 100644 --- a/src/Discord.Net/API/Common/Guild.cs +++ b/src/Discord.Net/API/Common/Guild.cs @@ -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")] diff --git a/src/Discord.Net/Entities/Guilds/Guild.cs b/src/Discord.Net/Entities/Guilds/Guild.cs index f17cb158c..ffe1faeb2 100644 --- a/src/Discord.Net/Entities/Guilds/Guild.cs +++ b/src/Discord.Net/Entities/Guilds/Guild.cs @@ -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; } diff --git a/src/Discord.Net/Entities/Guilds/IGuild.cs b/src/Discord.Net/Entities/Guilds/IGuild.cs index 3300132b0..0d4d95284 100644 --- a/src/Discord.Net/Entities/Guilds/IGuild.cs +++ b/src/Discord.Net/Entities/Guilds/IGuild.cs @@ -13,7 +13,8 @@ namespace Discord int AFKTimeout { get; } /// Returns true if this guild is embeddable (e.g. widget) bool IsEmbeddable { get; } - int VerificationLevel { get; } + /// Gets the level of requirements a user must fulfill before being allowed to post messages in this guild. + VerificationLevel VerificationLevel { get; } /// Returns the url to this guild's icon, or null if one is not set. string IconUrl { get; } /// Returns the url to this guild's splash image, or null if one is not set. diff --git a/src/Discord.Net/Entities/Guilds/VerificationLevel.cs b/src/Discord.Net/Entities/Guilds/VerificationLevel.cs new file mode 100644 index 000000000..d6828b5c9 --- /dev/null +++ b/src/Discord.Net/Entities/Guilds/VerificationLevel.cs @@ -0,0 +1,14 @@ +namespace Discord +{ + public enum VerificationLevel + { + /// Users have no additional restrictions on sending messages to this guild. + None = 0, + /// Users must have a verified email on their account. + Low = 1, + /// Users must fulfill the requirements of Low, and be registered on Discord for at least 5 minutes. + Medium = 2, + /// Users must fulfill the requirements of Medium, and be a member of this guild for at least 10 minutes. + High = 3 + } +}