From d3a18c242100fd47bf0d802ea89b4f0509810a9c Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Thu, 31 Mar 2022 18:23:45 -0400 Subject: [PATCH] BUG Would try to join when the bot was disconnected --- NoiseGatev2.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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")