Class VoiceLinkExtension
- Namespace
- DSharpPlus.VoiceLink
- Assembly
- DSharpPlus.VoiceLink.dll
public sealed class VoiceLinkExtension : BaseExtension, IDisposable
- Inheritance
-
BaseExtensionVoiceLinkExtension
- Implements
- Inherited Members
-
BaseExtension.Client
Constructors
VoiceLinkExtension(DiscordClient, VoiceLinkConfiguration)
public VoiceLinkExtension(DiscordClient client, VoiceLinkConfiguration configuration)
Parameters
client
DiscordClientconfiguration
VoiceLinkConfiguration
Properties
Configuration
public VoiceLinkConfiguration Configuration { get; init; }
Property Value
Connections
public IReadOnlyDictionary<ulong, VoiceLinkConnection> Connections { get; }
Property Value
Methods
ConnectAsync(DiscordChannel, VoiceState, CancellationToken)
public Task<VoiceLinkConnection> ConnectAsync(DiscordChannel channel, VoiceState voiceState, CancellationToken cancellationToken = default)
Parameters
channel
DiscordChannelvoiceState
VoiceStatecancellationToken
CancellationToken
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
Setup(DiscordClient)
Initializes this extension for given DSharpPlus.DiscordClient instance.
protected override void Setup(DiscordClient client)
Parameters
client
DiscordClientDiscord client to initialize for.
Events
ConnectionCreated
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkConnectionEventArgs> ConnectionCreated
Event Type
- AsyncEventHandler<VoiceLinkExtension, VoiceLinkConnectionEventArgs>
ConnectionDestroyed
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkConnectionEventArgs> ConnectionDestroyed
Event Type
- AsyncEventHandler<VoiceLinkExtension, VoiceLinkConnectionEventArgs>
UserConnected
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserEventArgs> UserConnected
Event Type
- AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserEventArgs>
UserDisconnected
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserEventArgs> UserDisconnected
Event Type
- AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserEventArgs>
UserSpeaking
public event AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserSpeakingEventArgs> UserSpeaking
Event Type
- AsyncEventHandler<VoiceLinkExtension, VoiceLinkUserSpeakingEventArgs>