fix join loop
This commit is contained in:
@@ -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...")
|
||||
|
||||
Reference in New Issue
Block a user