Added Voice Channel user_limit
This commit is contained in:
@@ -23,10 +23,16 @@ namespace Discord.API
|
||||
public int Position { get; set; }
|
||||
[JsonProperty("permission_overwrites")]
|
||||
public Overwrite[] PermissionOverwrites { get; set; }
|
||||
|
||||
//TextChannel
|
||||
[JsonProperty("topic")]
|
||||
public string Topic { get; set; }
|
||||
|
||||
//VoiceChannel
|
||||
[JsonProperty("bitrate")]
|
||||
public int Bitrate { get; set; }
|
||||
[JsonProperty("user_limit")]
|
||||
public int UserLimit { get; set; }
|
||||
|
||||
//DMChannel
|
||||
[JsonProperty("recipient")]
|
||||
|
||||
@@ -235,6 +235,7 @@ namespace Discord.API
|
||||
Preconditions.NotEqual(channelId, 0, nameof(channelId));
|
||||
Preconditions.NotNull(args, nameof(args));
|
||||
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.NotNullOrEmpty(args.Name, nameof(args.Name));
|
||||
|
||||
|
||||
@@ -6,5 +6,7 @@ namespace Discord.API.Rest
|
||||
{
|
||||
[JsonProperty("bitrate")]
|
||||
public Optional<int> Bitrate { get; set; }
|
||||
[JsonProperty("user_limit")]
|
||||
public Optional<int> UserLimit { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace Discord.Rest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public int Bitrate { get; private set; }
|
||||
/// <inheritdoc />
|
||||
public int UserLimit { get; private set; }
|
||||
|
||||
internal VoiceChannel(Guild guild, Model model)
|
||||
: base(guild, model)
|
||||
@@ -21,6 +23,7 @@ namespace Discord.Rest
|
||||
{
|
||||
base.Update(model);
|
||||
Bitrate = model.Bitrate;
|
||||
UserLimit = model.UserLimit;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user