Show / Hide Table of Contents

Class SocketVoiceChannel

Represents a WebSocket-based voice channel in a guild.

Inheritance
System.Object
SocketEntity<System.UInt64>
SocketChannel
SocketGuildChannel
SocketVoiceChannel
Implements
IVoiceChannel
INestedChannel
IGuildChannel
IDeletable
ISocketAudioChannel
IAudioChannel
IChannel
ISnowflakeEntity
IEntity<System.UInt64>
Inherited Members
SocketGuildChannel.Guild
SocketGuildChannel.Name
SocketGuildChannel.Position
SocketGuildChannel.PermissionOverwrites
SocketGuildChannel.ModifyAsync(Action<GuildChannelProperties>, RequestOptions)
SocketGuildChannel.DeleteAsync(RequestOptions)
SocketGuildChannel.GetPermissionOverwrite(IUser)
SocketGuildChannel.GetPermissionOverwrite(IRole)
SocketGuildChannel.AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)
SocketGuildChannel.AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)
SocketGuildChannel.RemovePermissionOverwriteAsync(IUser, RequestOptions)
SocketGuildChannel.RemovePermissionOverwriteAsync(IRole, RequestOptions)
SocketGuildChannel.ToString()
SocketGuildChannel.IGuildChannel.Guild
SocketGuildChannel.IGuildChannel.GuildId
SocketGuildChannel.IGuildChannel.GetPermissionOverwrite(IRole)
SocketGuildChannel.IGuildChannel.GetPermissionOverwrite(IUser)
SocketGuildChannel.IGuildChannel.AddPermissionOverwriteAsync(IRole, OverwritePermissions, RequestOptions)
SocketGuildChannel.IGuildChannel.AddPermissionOverwriteAsync(IUser, OverwritePermissions, RequestOptions)
SocketGuildChannel.IGuildChannel.RemovePermissionOverwriteAsync(IRole, RequestOptions)
SocketGuildChannel.IGuildChannel.RemovePermissionOverwriteAsync(IUser, RequestOptions)
SocketGuildChannel.IChannel.GetUserAsync(UInt64, CacheMode, RequestOptions)
SocketChannel.CreatedAt
SocketChannel.IChannel.Name
SocketEntity<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.WebSocket
Assembly: Discord.Net.WebSocket.dll
Syntax
public class SocketVoiceChannel : SocketGuildChannel, IVoiceChannel, INestedChannel, IGuildChannel, IDeletable, ISocketAudioChannel, 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

Category

Gets the parent (category) channel of this channel.

Declaration
public ICategoryChannel Category { get; }
Property Value
Type Description
ICategoryChannel

A category channel representing the parent of this channel; null if none is set.

| 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.

| Improve this Doc View Source

Users

Gets a collection of users that are able to view the channel.

Declaration
public override IReadOnlyCollection<SocketGuildUser> Users { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<SocketGuildUser>

A read-only collection of users that can access the channel (i.e. the users seen in the user list).

Overrides
SocketGuildChannel.Users

Methods

| Improve this Doc View Source

ConnectAsync(Boolean, Boolean, Boolean)

Connects to this audio channel.

Declaration
public Task<IAudioClient> ConnectAsync(bool selfDeaf = false, bool selfMute = false, bool external = false)
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.

| 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

DisconnectAsync()

Disconnects from this audio channel.

Declaration
public Task DisconnectAsync()
Returns
Type Description
System.Threading.Tasks.Task

A task representing the asynchronous operation for disconnecting from the audio channel.

| 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

GetUser(UInt64)

Declaration
public override SocketGuildUser GetUser(ulong id)
Parameters
Type Name Description
System.UInt64 id
Returns
Type Description
SocketGuildUser
Overrides
SocketGuildChannel.GetUser(UInt64)
| 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

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

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

IVoiceChannel
INestedChannel
IGuildChannel
IDeletable
ISocketAudioChannel
IAudioChannel
IChannel
ISnowflakeEntity
IEntity<TId>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX