diff --git a/NoiseGatev2.py b/NoiseGatev2.py index 9054edc..f8ae355 100644 --- a/NoiseGatev2.py +++ b/NoiseGatev2.py @@ -133,9 +133,10 @@ class NoiseGate(AudioStream): def core(self, error=None): if error: LOGGER.warning(error) - if not voice_connection.is_playing(): - LOGGER.debug(f"Playing stream to discord") - voice_connection.play(self.NGStream, after=self.core) + 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) async def close(self): LOGGER.debug(f"Closing")