[Feature] Add MaxStageVideoChannelUsers property to IGuild (#2648)

This commit is contained in:
Misha133
2023-03-31 14:14:24 +03:00
committed by GitHub
parent 2112e1f5b6
commit bdd755b8cf
4 changed files with 18 additions and 0 deletions

View File

@@ -302,6 +302,13 @@ namespace Discord
/// </returns> /// </returns>
int? MaxVideoChannelUsers { get; } int? MaxVideoChannelUsers { get; }
/// <summary> /// <summary>
/// Gets the maximum amount of users in a stage video channel.
/// </summary>
/// <returns>
/// The maximum amount of users in a stage video channel.
/// </returns>
int? MaxStageVideoChannelUsers { get; }
/// <summary>
/// Gets the approximate number of members in this guild. /// Gets the approximate number of members in this guild.
/// </summary> /// </summary>
/// <remarks> /// <remarks>

View File

@@ -88,5 +88,8 @@ namespace Discord.API
[JsonProperty("welcome_screen")] [JsonProperty("welcome_screen")]
public Optional<WelcomeScreen> WelcomeScreen { get; set; } public Optional<WelcomeScreen> WelcomeScreen { get; set; }
[JsonProperty("max_stage_video_channel_users")]
public Optional<int> MaxStageVideoChannelUsers { get; set; }
} }
} }

View File

@@ -84,6 +84,8 @@ namespace Discord.Rest
/// <inheritdoc /> /// <inheritdoc />
public int? MaxVideoChannelUsers { get; private set; } public int? MaxVideoChannelUsers { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
public int? MaxStageVideoChannelUsers { get; private set; }
/// <inheritdoc />
public int? ApproximateMemberCount { get; private set; } public int? ApproximateMemberCount { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
public int? ApproximatePresenceCount { get; private set; } public int? ApproximatePresenceCount { get; private set; }
@@ -185,6 +187,8 @@ namespace Discord.Rest
MaxMembers = model.MaxMembers.Value; MaxMembers = model.MaxMembers.Value;
if (model.MaxVideoChannelUsers.IsSpecified) if (model.MaxVideoChannelUsers.IsSpecified)
MaxVideoChannelUsers = model.MaxVideoChannelUsers.Value; MaxVideoChannelUsers = model.MaxVideoChannelUsers.Value;
if (model.MaxStageVideoChannelUsers.IsSpecified)
MaxStageVideoChannelUsers = model.MaxStageVideoChannelUsers.Value;
PreferredLocale = model.PreferredLocale; PreferredLocale = model.PreferredLocale;
PreferredCulture = new CultureInfo(PreferredLocale); PreferredCulture = new CultureInfo(PreferredLocale);
if (model.ApproximateMemberCount.IsSpecified) if (model.ApproximateMemberCount.IsSpecified)

View File

@@ -130,6 +130,8 @@ namespace Discord.WebSocket
/// <inheritdoc /> /// <inheritdoc />
public int? MaxVideoChannelUsers { get; private set; } public int? MaxVideoChannelUsers { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
public int? MaxStageVideoChannelUsers { get; private set; }
/// <inheritdoc />
public NsfwLevel NsfwLevel { get; private set; } public NsfwLevel NsfwLevel { get; private set; }
/// <inheritdoc /> /// <inheritdoc />
public CultureInfo PreferredCulture { get; private set; } public CultureInfo PreferredCulture { get; private set; }
@@ -547,6 +549,8 @@ namespace Discord.WebSocket
MaxMembers = model.MaxMembers.Value; MaxMembers = model.MaxMembers.Value;
if (model.MaxVideoChannelUsers.IsSpecified) if (model.MaxVideoChannelUsers.IsSpecified)
MaxVideoChannelUsers = model.MaxVideoChannelUsers.Value; MaxVideoChannelUsers = model.MaxVideoChannelUsers.Value;
if (model.MaxStageVideoChannelUsers.IsSpecified)
MaxStageVideoChannelUsers = model.MaxStageVideoChannelUsers.Value;
PreferredLocale = model.PreferredLocale; PreferredLocale = model.PreferredLocale;
PreferredCulture = PreferredLocale == null ? null : new CultureInfo(PreferredLocale); PreferredCulture = PreferredLocale == null ? null : new CultureInfo(PreferredLocale);
if (model.IsBoostProgressBarEnabled.IsSpecified) if (model.IsBoostProgressBarEnabled.IsSpecified)