Table of Contents

Class GatewayClientExtensions

Namespace
NetCord.Gateway.Voice
Assembly
NetCord.dll
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 GatewayClient

The GatewayClient instance.

guildId ulong

The ID of the guild containing the channel.

channelId ulong

The ID of the voice channel to join.

configuration VoiceClientConfiguration

Configuration settings for the VoiceClient.

cancellationToken CancellationToken

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