Table of Contents

Class VoiceLinkExtension

Namespace
DSharpPlus.VoiceLink
Assembly
DSharpPlus.VoiceLink.dll
public sealed class VoiceLinkExtension : BaseExtension, IDisposable
Inheritance
BaseExtension
VoiceLinkExtension
Implements
Inherited Members
BaseExtension.Client

Constructors

public VoiceLinkExtension(DiscordClient client, VoiceLinkConfiguration configuration)

Parameters

client DiscordClient
configuration VoiceLinkConfiguration

Properties

public VoiceLinkConfiguration Configuration { get; init; }

Property Value

VoiceLinkConfiguration
public IReadOnlyDictionary<ulong, VoiceLinkConnection> Connections { get; }

Property Value

IReadOnlyDictionary<ulong, VoiceLinkConnection>

Methods

public Task<VoiceLinkConnection> ConnectAsync(DiscordChannel channel, VoiceState voiceState, CancellationToken cancellationToken = default)

Parameters

channel DiscordChannel
voiceState VoiceState
cancellationToken CancellationToken

Returns

Task<VoiceLinkConnection>

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

Initializes this extension for given DSharpPlus.DiscordClient instance.

protected override void Setup(DiscordClient client)

Parameters

client DiscordClient

Discord client to initialize for.

Events

public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkConnectionEventArgs> ConnectionCreated

Event Type

AsyncEventHandler<VoiceLinkExtension, VoiceLinkConnectionEventArgs>
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkConnectionEventArgs> ConnectionDestroyed

Event Type

AsyncEventHandler<VoiceLinkExtension, VoiceLinkConnectionEventArgs>
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserEventArgs> UserConnected

Event Type

AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserEventArgs>
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserEventArgs> UserDisconnected

Event Type

AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserEventArgs>
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserSpeakingEventArgs> UserSpeaking

Event Type

AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserSpeakingEventArgs>