@@ -231,6 +231,13 @@ namespace Discord | |||||
/// The description for the guild; <c>null</c> if none is set. | /// The description for the guild; <c>null</c> if none is set. | ||||
/// </returns> | /// </returns> | ||||
string Description { get; } | string Description { get; } | ||||
/// <summary> | |||||
/// Gets the number of premium subscribers of this guild. | |||||
/// </summary> | |||||
/// <returns> | |||||
/// The number of premium subscribers of this guild. | |||||
/// </returns> | |||||
int PremiumSubscriptionCount { get; } | |||||
/// <summary> | /// <summary> | ||||
/// Modifies this guild. | /// Modifies this guild. | ||||
@@ -54,5 +54,7 @@ namespace Discord.API | |||||
// this value is inverted, flags set will turn OFF features | // this value is inverted, flags set will turn OFF features | ||||
[JsonProperty("system_channel_flags")] | [JsonProperty("system_channel_flags")] | ||||
public SystemChannelMessageDeny SystemChannelFlags { get; set; } | public SystemChannelMessageDeny SystemChannelFlags { get; set; } | ||||
[JsonProperty("premium_subscription_count")] | |||||
public Optional<int> PremiumSubscriptionCount { get; set; } | |||||
} | } | ||||
} | } |
@@ -60,6 +60,8 @@ namespace Discord.Rest | |||||
public SystemChannelMessageDeny SystemChannelFlags { get; private set; } | public SystemChannelMessageDeny SystemChannelFlags { get; private set; } | ||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public string Description { get; private set; } | public string Description { get; private set; } | ||||
/// <inheritdoc /> | |||||
public int PremiumSubscriptionCount { get; private set; } | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); | public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); | ||||
@@ -118,6 +120,7 @@ namespace Discord.Rest | |||||
VanityId = model.VanityURLCode; | VanityId = model.VanityURLCode; | ||||
SystemChannelFlags = model.SystemChannelFlags; | SystemChannelFlags = model.SystemChannelFlags; | ||||
Description = model.Description; | Description = model.Description; | ||||
PremiumSubscriptionCount = model.PremiumSubscriptionCount.GetValueOrDefault(); | |||||
if (model.Emojis != null) | if (model.Emojis != null) | ||||
{ | { | ||||
@@ -101,6 +101,8 @@ namespace Discord.WebSocket | |||||
public SystemChannelMessageDeny SystemChannelFlags { get; private set; } | public SystemChannelMessageDeny SystemChannelFlags { get; private set; } | ||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public string Description { get; private set; } | public string Description { get; private set; } | ||||
/// <inheritdoc /> | |||||
public int PremiumSubscriptionCount { get; private set; } | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); | public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); | ||||
@@ -368,6 +370,7 @@ namespace Discord.WebSocket | |||||
VanityId = model.VanityURLCode; | VanityId = model.VanityURLCode; | ||||
SystemChannelFlags = model.SystemChannelFlags; | SystemChannelFlags = model.SystemChannelFlags; | ||||
Description = model.Description; | Description = model.Description; | ||||
PremiumSubscriptionCount = model.PremiumSubscriptionCount.GetValueOrDefault(); | |||||
if (model.Emojis != null) | if (model.Emojis != null) | ||||
{ | { | ||||