From 85b7275bfe1219a82c355095821be754f7c12229 Mon Sep 17 00:00:00 2001 From: jaredthomason Date: Sun, 12 May 2024 12:34:28 -0400 Subject: [PATCH] whoops v2 --- src/bot.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/bot.js b/src/bot.js index fba24f1..7d78539 100644 --- a/src/bot.js +++ b/src/bot.js @@ -62,23 +62,6 @@ function JoinChannel(channel, track, volume) { adapterCreator: channel.guild.voiceAdapterCreator, selfDeaf: true }); - - connection.on(dVC.VoiceConnectionStatus.Disconnected, async () => { - let attemptReconnect = true; - while (attemptReconnect) { - try { - console.log("Disconnected. Attempting to reconnect..."); - await Promise.race([ - entersState(connection, dVC.VoiceConnectionStatus.Signalling, 5_000), - entersState(connection, dVC.VoiceConnectionStatus.Connecting, 5_000), - ]); - console.log("Reconnected successfully."); - attemptReconnect = false; - } catch (error) { - console.log("Reconnection attempt failed. Retrying..."); - } - } -}); const resource = dVC.createAudioResource(track, {inlineVolume: true, silencePaddingFrames: 5}); const player = dVC.createAudioPlayer();