Browse Source

Added UserLimit to IVoiceChannel

tags/1.0-rc
RogueException 9 years ago
parent
commit
af680b7f43
2 changed files with 5 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net/Common/Entities/Channels/IVoiceChannel.cs
  2. +3
    -0
      src/Discord.Net/WebSocket/Entities/Channels/VoiceChannel.cs

+ 2
- 0
src/Discord.Net/Common/Entities/Channels/IVoiceChannel.cs View File

@@ -8,6 +8,8 @@ namespace Discord
{
/// <summary> Gets the bitrate, in bits per second, clients in this voice channel are requested to use. </summary>
int Bitrate { get; }
/// <summary> Gets the max amount of users allowed to be connected to this channel at one time. A value of 0 represents no limit. </summary>
int UserLimit { get; }

/// <summary> Modifies this voice channel. </summary>
Task Modify(Action<ModifyVoiceChannelParams> func);


+ 3
- 0
src/Discord.Net/WebSocket/Entities/Channels/VoiceChannel.cs View File

@@ -13,6 +13,8 @@ namespace Discord.WebSocket
{
/// <inheritdoc />
public int Bitrate { get; private set; }
/// <inheritdoc />
public int UserLimit { get; private set; }

public override IEnumerable<GuildUser> Users
=> Guild.Users.Where(x => x.VoiceChannel == this);
@@ -25,6 +27,7 @@ namespace Discord.WebSocket
{
base.Update(model);
Bitrate = model.Bitrate;
UserLimit = model.UserLimit;
}

/// <inheritdoc />


Loading…
Cancel
Save