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
clientGatewayClientThe GatewayClient instance.
guildIdulongThe ID of the guild containing the channel.
channelIdulongThe ID of the voice channel to join.
configurationVoiceClientConfigurationConfiguration settings for the VoiceClient.
cancellationTokenCancellationTokenCancellation 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.