[ifcbrk] feature: BOOST (#1319)

* add new MessageTypes

* Add new properties to the updated models

* add the SystemChannelMessageDeny

unsure if there would be a better name for this enum, given it's inverted nature, open for suggestions

* add PremiumTier flag, add Guild description property

* add method for getting vanity image from CDN

* make the size of GetGuildVanityUrl optional

* lint: remove commented out code from prev commit

* add a None flag to SystemChannelMessage enum

* implement the new modify guild params

* implement additional model properties in IGuild types

* implement GuildMember PremiumSince

* docs: reword size param explanation

* add extension methods that make it easier to check the SystemChannelMessage flags for end users

because the flag is inverted, this ideally should make it easier for the user. it may also be useful to do something similar for modifying this property

* docs: correct typo from copy-paste

* add the premium_subscription_count property

* fix vanity url code and banner switchup

a mistake was made somewhere, that's all I know for sure

* clarify remark on inverted logic for system channel flags

* fix PremiumSubscriptionCount optional value

* add another example to the systemchannelflags xmldoc remark

* docs: fix typos, clarify wording

* use DateTimeOffset for PremiumSince, follow conventions from other prop
This commit is contained in:
Chris Johnston
2019-06-21 14:34:45 -07:00
committed by Christopher F
parent d6d4429c3d
commit faf23dee35
18 changed files with 252 additions and 5 deletions

View File

@@ -45,5 +45,18 @@ namespace Discord.API
public ulong? ApplicationId { get; set; }
[JsonProperty("system_channel_id")]
public ulong? SystemChannelId { get; set; }
[JsonProperty("premium_tier")]
public PremiumTier PremiumTier { get; set; }
[JsonProperty("vanity_url_code")]
public string VanityURLCode { get; set; }
[JsonProperty("banner")]
public string Banner { get; set; }
[JsonProperty("description")]
public string Description { get; set; }
// this value is inverted, flags set will turn OFF features
[JsonProperty("system_channel_flags")]
public SystemChannelMessageDeny SystemChannelFlags { get; set; }
[JsonProperty("premium_subscription_count")]
public int? PremiumSubscriptionCount { get; set; }
}
}

View File

@@ -1,4 +1,4 @@
#pragma warning disable CS1591
#pragma warning disable CS1591
using Newtonsoft.Json;
using System;
@@ -18,5 +18,7 @@ namespace Discord.API
public Optional<bool> Deaf { get; set; }
[JsonProperty("mute")]
public Optional<bool> Mute { get; set; }
[JsonProperty("premium_since")]
public Optional<DateTimeOffset?> PremiumSince { get; set; }
}
}

View File

@@ -30,5 +30,7 @@ namespace Discord.API.Rest
public Optional<ulong> OwnerId { get; set; }
[JsonProperty("explicit_content_filter")]
public Optional<ExplicitContentFilterLevel> ExplicitContentFilter { get; set; }
[JsonProperty("system_channel_flags")]
public Optional<SystemChannelMessageDeny> SystemChannelFlags { get; set; }
}
}