From d90b9306c7ee4ae0182d61dc16997a35b2eedebc Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Tue, 23 Jun 2026 22:30:37 +0200 Subject: [PATCH] Set join voice channel default timeout to 5 seconds --- NetCord/Gateway/Voice/GatewayClientExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NetCord/Gateway/Voice/GatewayClientExtensions.cs b/NetCord/Gateway/Voice/GatewayClientExtensions.cs index 174d6a799..6e3bd5bf9 100644 --- a/NetCord/Gateway/Voice/GatewayClientExtensions.cs +++ b/NetCord/Gateway/Voice/GatewayClientExtensions.cs @@ -9,7 +9,7 @@ public static class GatewayClientExtensions /// The ID of the guild containing the channel. /// The ID of the voice channel to join. /// Configuration settings for the . - /// The maximum amount of time to wait for the voice state and server update events. If not specified, a default timeout of 2 seconds is used. + /// The maximum amount of time to wait for the voice state and server update events. If not specified, a default timeout of 5 seconds is used. /// The to use for measuring the timeout. If not specified, is used. /// Cancellation token for the operation. /// This method is not thread safe and should not be used concurrently for the same . @@ -48,7 +48,7 @@ public static async Task JoinVoiceChannelAsync(this GatewayClient c try { - await eventsTaskCompletionSource.Task.WaitAsync(timeout ?? new(2 * TimeSpan.TicksPerSecond), + await eventsTaskCompletionSource.Task.WaitAsync(timeout ?? new(5 * TimeSpan.TicksPerSecond), timeProvider ?? TimeProvider.System, cancellationToken).ConfigureAwait(false); }