Class GatewayClientExtensions
public static class GatewayClientExtensions
- Inheritance
-
GatewayClientExtensions
- Inherited Members
Methods
JoinVoiceChannelAsync(GatewayClient, ulong, ulong, VoiceClientConfiguration?, CancellationToken)
Joins a voice channel.
public static Task<VoiceClient> JoinVoiceChannelAsync(this GatewayClient client, ulong guildId, ulong channelId, VoiceClientConfiguration? configuration = null, CancellationToken cancellationToken = default)
Parameters
client
GatewayClientThe GatewayClient instance.
guildId
ulongThe ID of the guild containing the channel.
channelId
ulongThe ID of the voice channel to join.
configuration
VoiceClientConfigurationConfiguration settings for the VoiceClient.
cancellationToken
CancellationTokenCancellation token for the operation. If not cancellable, the default timeout of 2 seconds is used.
Returns
- Task<VoiceClient>
A task, the result of which is an unconnected VoiceClient instance.
Remarks
This method is not thread safe and should not be used concurrently for the same guildId
.