diff --git a/NoiseGatev2.py b/NoiseGatev2.py index f8ae355..96a8db0 100644 --- a/NoiseGatev2.py +++ b/NoiseGatev2.py @@ -133,10 +133,13 @@ class NoiseGate(AudioStream): def core(self, error=None): if error: LOGGER.warning(error) - if voice_connection.is_connected(): - if not voice_connection.is_playing(): - LOGGER.debug(f"Playing stream to discord") - voice_connection.play(self.NGStream, after=self.core) + + while not voice_connection.is_connected(): + time.sleep(.2) + + if not voice_connection.is_playing(): + LOGGER.debug(f"Playing stream to discord") + voice_connection.play(self.NGStream, after=self.core) async def close(self): LOGGER.debug(f"Closing")