working on #7
This commit is contained in:
@@ -135,10 +135,7 @@ class NoiseGate(AudioStream):
|
||||
if error:
|
||||
LOGGER.warning(error)
|
||||
|
||||
while not voice_connection.is_connected():
|
||||
time.sleep(.2)
|
||||
|
||||
if not voice_connection.is_playing():
|
||||
if voice_connection.is_connected() and not voice_connection.is_playing():
|
||||
LOGGER.debug("Playing stream to discord")
|
||||
voice_connection.play(self.NGStream, after=self.core)
|
||||
|
||||
@@ -187,7 +184,7 @@ class NoiseGateStream(discord.AudioSource):
|
||||
if curr_buffer:
|
||||
return bytes(curr_buffer)
|
||||
|
||||
except OSError as e:
|
||||
except Exception as e:
|
||||
LOGGER.warning(e)
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user