Working on bug in leaving

This commit is contained in:
Logan Cusano
2022-02-27 18:36:18 -05:00
parent 17c528c153
commit 7fa11a4abe
2 changed files with 17 additions and 21 deletions

6
bot.py
View File

@@ -91,9 +91,9 @@ class Bot(commands.Bot):
voice_connection = await channel.connect()
# Create an audio stream from selected device
self.streamHandler = sound.PCMStream()
# Ensure the selected device is available and start the audio stream
self.streamHandler.change_device(self.DEVICE_ID)
self.streamHandler = sound.PCMStream(self.DEVICE_ID)
# Start the audio stream
self.streamHandler.stream.start()
# Play the stream
voice_connection.play(discord.PCMAudio(self.streamHandler))