From 49b01d219e9acaf4f1ce00bc7397bcebbc00f700 Mon Sep 17 00:00:00 2001 From: Chris Johnston Date: Tue, 4 Jun 2019 20:29:14 -0700 Subject: [PATCH] add PremiumTier flag, add Guild description property --- .../Entities/Guilds/PremiumTier.cs | 22 +++++++++++++++++++ src/Discord.Net.Rest/API/Common/Guild.cs | 6 +++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 src/Discord.Net.Core/Entities/Guilds/PremiumTier.cs diff --git a/src/Discord.Net.Core/Entities/Guilds/PremiumTier.cs b/src/Discord.Net.Core/Entities/Guilds/PremiumTier.cs new file mode 100644 index 000000000..9ac700448 --- /dev/null +++ b/src/Discord.Net.Core/Entities/Guilds/PremiumTier.cs @@ -0,0 +1,22 @@ +namespace Discord +{ + public enum PremiumTier + { + /// + /// Used for guilds that have no guild boosts. + /// + None = 0, + /// + /// Used for guilds that have Tier 1 guild boosts. + /// + Tier1 = 1, + /// + /// Used for guilds that have Tier 1 guild boosts. + /// + Tier2 = 2, + /// + /// Used for guilds that have Tier 1 guild boosts. + /// + Tier3 = 3 + } +} diff --git a/src/Discord.Net.Rest/API/Common/Guild.cs b/src/Discord.Net.Rest/API/Common/Guild.cs index 62bd90c19..c12055fb1 100644 --- a/src/Discord.Net.Rest/API/Common/Guild.cs +++ b/src/Discord.Net.Rest/API/Common/Guild.cs @@ -46,11 +46,13 @@ namespace Discord.API [JsonProperty("system_channel_id")] public ulong? SystemChannelId { get; set; } [JsonProperty("premium_tier")] - public int PremiumTier { get; set; } + public PremiumTier PremiumTier { get; set; } [JsonProperty("vanity_url_code")] public string VanityURLCode { get; set; } + [JsonProperty("description")] + public string Description { get; set; } // this value is inverted, flags set will turn OFF features [JsonProperty("system_channel_flags")] - public int SystemChannelFlags { get; set; } + public SystemChannelMessageDeny SystemChannelFlags { get; set; } } }