[Feature] Add missing VoiceChannel properties (#2573)
* add missing properties * forgot about `MockedVoiceChannel`
This commit is contained in:
@@ -43,6 +43,9 @@ namespace Discord.API
|
||||
[JsonProperty("rtc_region")]
|
||||
public Optional<string> RTCRegion { get; set; }
|
||||
|
||||
[JsonProperty("video_quality_mode")]
|
||||
public Optional<VideoQualityMode> VideoQualityMode { get; set; }
|
||||
|
||||
//PrivateChannel
|
||||
[JsonProperty("recipients")]
|
||||
public Optional<User[]> Recipients { get; set; }
|
||||
|
||||
@@ -31,6 +31,10 @@ namespace Discord.API.Rest
|
||||
public Optional<int> Bitrate { get; set; }
|
||||
[JsonProperty("user_limit")]
|
||||
public Optional<int?> UserLimit { get; set; }
|
||||
[JsonProperty("video_quality_mode")]
|
||||
public Optional<VideoQualityMode> VideoQuality { get; set; }
|
||||
[JsonProperty("rtc_region")]
|
||||
public Optional<string> RtcRegion { get; set; }
|
||||
|
||||
//Forum channels
|
||||
[JsonProperty("default_reaction_emoji")]
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace Discord.Rest
|
||||
public int? UserLimit { get; private set; }
|
||||
/// <inheritdoc/>
|
||||
public string RTCRegion { get; private set; }
|
||||
/// <inheritdoc/>
|
||||
public VideoQualityMode VideoQualityMode { get; private set; }
|
||||
|
||||
internal RestVoiceChannel(BaseDiscordClient discord, IGuild guild, ulong id)
|
||||
: base(discord, guild, id)
|
||||
@@ -48,6 +50,8 @@ namespace Discord.Rest
|
||||
if(model.UserLimit.IsSpecified)
|
||||
UserLimit = model.UserLimit.Value != 0 ? model.UserLimit.Value : (int?)null;
|
||||
|
||||
VideoQualityMode = model.VideoQualityMode.GetValueOrDefault(VideoQualityMode.Auto);
|
||||
|
||||
RTCRegion = model.RTCRegion.GetValueOrDefault(null);
|
||||
}
|
||||
|
||||
|
||||
@@ -285,6 +285,8 @@ namespace Discord.Rest
|
||||
Deny = overwrite.Permissions.DenyValue.ToString()
|
||||
}).ToArray()
|
||||
: Optional.Create<API.Overwrite[]>(),
|
||||
VideoQuality = props.VideoQualityMode,
|
||||
RtcRegion = props.RTCRegion
|
||||
};
|
||||
var model = await client.ApiClient.CreateGuildChannelAsync(guild.Id, args, options).ConfigureAwait(false);
|
||||
return RestVoiceChannel.Create(client, guild, model);
|
||||
|
||||
Reference in New Issue
Block a user