Show / Hide Table of Contents

# Class RestVoiceChannel

Represents a REST-based voice channel in a guild.

##### Inheritance

System.Object
RestEntity<System.UInt64>
RestChannel
RestGuildChannel
RestVoiceChannel

##### Implements

IUpdateable
IVoiceChannel
INestedChannel
IGuildChannel
IDeletable
IRestAudioChannel
IAudioChannel
IChannel
ISnowflakeEntity
IEntity<System.UInt64>

##### Inherited Members

RestGuildChannel.PermissionOverwrites
RestGuildChannel.Name
RestGuildChannel.Position
RestGuildChannel.GuildId
RestGuildChannel.UpdateAsync(RequestOptions)
RestGuildChannel.ModifyAsync(Action<GuildChannelProperties>, RequestOptions)
RestGuildChannel.DeleteAsync(RequestOptions)
RestGuildChannel.GetPermissionOverwrite(IUser)
RestGuildChannel.GetPermissionOverwrite(IRole)
RestGuildChannel.AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)
RestGuildChannel.AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)
RestGuildChannel.RemovePermissionOverwriteAsync(IUser, RequestOptions)
RestGuildChannel.RemovePermissionOverwriteAsync(IRole, RequestOptions)
RestGuildChannel.ToString()
RestGuildChannel.IGuildChannel.Guild
RestGuildChannel.IGuildChannel.GetPermissionOverwrite(IRole)
RestGuildChannel.IGuildChannel.GetPermissionOverwrite(IUser)
RestGuildChannel.IGuildChannel.AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)
RestGuildChannel.IGuildChannel.AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)
RestGuildChannel.IGuildChannel.RemovePermissionOverwriteAsync(IRole, RequestOptions)
RestGuildChannel.IGuildChannel.RemovePermissionOverwriteAsync(IUser, RequestOptions)
RestGuildChannel.IChannel.GetUsersAsync(CacheMode, RequestOptions)
RestGuildChannel.IChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)
RestChannel.CreatedAt
RestChannel.IChannel.Name
RestEntity<UInt64>.Id
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Discord.Rest

###### Assembly: Discord.Net.Rest.dll

##### Syntax

    public class RestVoiceChannel : RestGuildChannel, IUpdateable, IVoiceChannel, INestedChannel, IGuildChannel, IDeletable, IRestAudioChannel, IAudioChannel, IChannel, ISnowflakeEntity, IEntity<ulong>

### Properties

| Improve this Doc View Source

#### Bitrate

Gets the bit-rate that the clients in this voice channel are requested to use.

##### Declaration

    public int Bitrate { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 | An System.Int32 representing the bit-rate (bps) that this voice channel defines and requests the client(s) to use.

| Improve this Doc View Source

#### CategoryId

Gets the parent (category) ID of this channel in the guild's channel list.

##### Declaration

    public ulong? CategoryId { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.UInt64> | A System.UInt64 representing the snowflake identifier of the parent of this channel; `null` if none is set.

| Improve this Doc View Source

#### UserLimit

Gets the max number of users allowed to be connected to this channel at once.

##### Declaration

    public int? UserLimit { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.Int32> | An System.Int32 representing the maximum number of users that are allowed to be connected to this channel at once; `null` if a limit is not set.

### Methods

| Improve this Doc View Source

#### CreateInviteAsync(Nullable<Int32>, Nullable<Int32>, Boolean, Boolean, RequestOptions)

Creates a new invite to this channel.

##### Declaration

    public Task<IInviteMetadata> CreateInviteAsync(int? maxAge, int? maxUses = default(int? ), bool isTemporary = false, bool isUnique = false, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Nullable<System.Int32> | maxAge | The time (in seconds) until the invite expires. Set to `null` to never expire.
System.Nullable<System.Int32> | maxUses | The max amount of times this invite may be used. Set to `null` to have unlimited uses.
System.Boolean | isTemporary | If `true`, the user accepting this invite will be kicked from the guild after closing their client.
System.Boolean | isUnique | If `true`, don't try to reuse a similar invite (useful for creating many unique one time use invites).
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<IInviteMetadata> | A task that represents the asynchronous invite creation operation. The task result contains an invite metadata object containing information for the created invite.

| Improve this Doc View Source

#### GetCategoryAsync(RequestOptions)

Gets the parent (category) channel of this channel.

##### Declaration

    public Task<ICategoryChannel> GetCategoryAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<ICategoryChannel> | A task that represents the asynchronous get operation. The task result contains the category channel representing the parent of this channel; `null` if none is set.

| Improve this Doc View Source

#### GetInvitesAsync(RequestOptions)

Gets a collection of all invites to this channel.

##### Declaration

    public Task<IReadOnlyCollection<IInviteMetadata>> GetInvitesAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<IInviteMetadata>> | A task that represents the asynchronous get operation. The task result contains a read-only collection of invite metadata that are created for this channel.

| Improve this Doc View Source

#### ModifyAsync(Action<VoiceChannelProperties>, RequestOptions)

Modifies this voice channel.

##### Declaration

    public Task ModifyAsync(Action<VoiceChannelProperties> func, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Action<VoiceChannelProperties> | func | The properties to modify the channel with.
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task | A task that represents the asynchronous modification operation.

##### See Also

VoiceChannelProperties
| Improve this Doc View Source

#### SyncPermissionsAsync(RequestOptions)

Syncs the permissions of this nested channel with its parent's.

##### Declaration

    public Task SyncPermissionsAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task | A task that represents the asynchronous operation for syncing channel permissions with its parent's.

### Explicit Interface Implementations

| Improve this Doc View Source

#### IAudioChannel.ConnectAsync(Boolean, Boolean, Boolean)

Connects to this audio channel.

##### Declaration

    Task<IAudioClient> IAudioChannel.ConnectAsync(bool selfDeaf, bool selfMute, bool external)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | selfDeaf | Determines whether the client should deaf itself upon connection.
System.Boolean | selfMute | Determines whether the client should mute itself upon connection.
System.Boolean | external | Determines whether the audio client is an external one or not.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<IAudioClient> | A task representing the asynchronous connection operation. The task result contains the IAudioClient responsible for the connection.

##### Exceptions

Type | Condition
--- | ---
System.NotSupportedException | Connecting to a REST-based channel is not supported.

| Improve this Doc View Source

#### IAudioChannel.DisconnectAsync()

##### Declaration

    Task IAudioChannel.DisconnectAsync()

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### IGuildChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)

Gets a user in this channel.

##### Declaration

    Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | id | The snowflake identifier of the user.
CacheMode | mode | The CacheMode that determines whether the object should be fetched from cache.
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<IGuildUser> | A task representing the asynchronous get operation. The task result contains a guild user object that represents the user; `null` if none is found.

| Improve this Doc View Source

#### IGuildChannel.GetUsersAsync(CacheMode, RequestOptions)

Gets a collection of users that are able to view the channel or are currently in this channel.

##### Declaration

    IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
CacheMode | mode | The CacheMode that determines whether the object should be fetched from cache.
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<IGuildUser>> | Paged collection of users.

##### Remarks

This method follows the same behavior as described in GetUsersAsync(CacheMode, RequestOptions). Please visit its documentation for more details on this method.

| Improve this Doc View Source

#### INestedChannel.GetCategoryAsync(CacheMode, RequestOptions)

Gets the parent (category) channel of this channel.

##### Declaration

    Task<ICategoryChannel> INestedChannel.GetCategoryAsync(CacheMode mode, RequestOptions options)

##### Parameters

Type | Name | Description
--- | --- | ---
CacheMode | mode | The CacheMode that determines whether the object should be fetched from cache.
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<ICategoryChannel> | A task that represents the asynchronous get operation. The task result contains the category channel representing the parent of this channel; `null` if none is set.

### Implements

IUpdateable
IVoiceChannel
INestedChannel
IGuildChannel
IDeletable
IRestAudioChannel
IAudioChannel
IChannel
ISnowflakeEntity
IEntity<TId>