| @@ -23,10 +23,16 @@ namespace Discord.API | |||||
| public int Position { get; set; } | public int Position { get; set; } | ||||
| [JsonProperty("permission_overwrites")] | [JsonProperty("permission_overwrites")] | ||||
| public Overwrite[] PermissionOverwrites { get; set; } | public Overwrite[] PermissionOverwrites { get; set; } | ||||
| //TextChannel | |||||
| [JsonProperty("topic")] | [JsonProperty("topic")] | ||||
| public string Topic { get; set; } | public string Topic { get; set; } | ||||
| //VoiceChannel | |||||
| [JsonProperty("bitrate")] | [JsonProperty("bitrate")] | ||||
| public int Bitrate { get; set; } | public int Bitrate { get; set; } | ||||
| [JsonProperty("user_limit")] | |||||
| public int UserLimit { get; set; } | |||||
| //DMChannel | //DMChannel | ||||
| [JsonProperty("recipient")] | [JsonProperty("recipient")] | ||||
| @@ -235,6 +235,7 @@ namespace Discord.API | |||||
| Preconditions.NotEqual(channelId, 0, nameof(channelId)); | Preconditions.NotEqual(channelId, 0, nameof(channelId)); | ||||
| Preconditions.NotNull(args, nameof(args)); | Preconditions.NotNull(args, nameof(args)); | ||||
| Preconditions.GreaterThan(args.Bitrate, 0, nameof(args.Bitrate)); | Preconditions.GreaterThan(args.Bitrate, 0, nameof(args.Bitrate)); | ||||
| Preconditions.AtLeast(args.UserLimit, 0, nameof(args.Bitrate)); | |||||
| Preconditions.AtLeast(args.Position, 0, nameof(args.Position)); | Preconditions.AtLeast(args.Position, 0, nameof(args.Position)); | ||||
| Preconditions.NotNullOrEmpty(args.Name, nameof(args.Name)); | Preconditions.NotNullOrEmpty(args.Name, nameof(args.Name)); | ||||
| @@ -6,5 +6,7 @@ namespace Discord.API.Rest | |||||
| { | { | ||||
| [JsonProperty("bitrate")] | [JsonProperty("bitrate")] | ||||
| public Optional<int> Bitrate { get; set; } | public Optional<int> Bitrate { get; set; } | ||||
| [JsonProperty("user_limit")] | |||||
| public Optional<int> UserLimit { get; set; } | |||||
| } | } | ||||
| } | } | ||||
| @@ -12,6 +12,8 @@ namespace Discord.Rest | |||||
| { | { | ||||
| /// <inheritdoc /> | /// <inheritdoc /> | ||||
| public int Bitrate { get; private set; } | public int Bitrate { get; private set; } | ||||
| /// <inheritdoc /> | |||||
| public int UserLimit { get; private set; } | |||||
| internal VoiceChannel(Guild guild, Model model) | internal VoiceChannel(Guild guild, Model model) | ||||
| : base(guild, model) | : base(guild, model) | ||||
| @@ -21,6 +23,7 @@ namespace Discord.Rest | |||||
| { | { | ||||
| base.Update(model); | base.Update(model); | ||||
| Bitrate = model.Bitrate; | Bitrate = model.Bitrate; | ||||
| UserLimit = model.UserLimit; | |||||
| } | } | ||||
| /// <inheritdoc /> | /// <inheritdoc /> | ||||