fix join loop

This commit is contained in:
Logan Cusano
2025-07-14 21:20:58 -04:00
parent abd78c83d2
commit 09e0541bec

View File

@@ -109,14 +109,10 @@ class NoiseGate(AudioStream):
self.stream.start_stream()
self.core()
def core(self, error=None):
if error:
LOGGER.warning(f"Audio stream stopped unexpectedly with error: {error}")
return
def core(self):
if self.voice_connection.is_connected() and not self.voice_connection.is_playing():
LOGGER.debug("Playing stream to discord")
self.voice_connection.play(self.NGStream, after=lambda e: self.core(e))
self.voice_connection.play(self.NGStream)
async def close(self):
LOGGER.debug("Closing NoiseGate resources...")