From 2d43f6a658b5bbd79ed6ee8b254622092fd1ba2a Mon Sep 17 00:00:00 2001 From: mtuszowski Date: Thu, 19 Sep 2024 12:59:01 +0200 Subject: [PATCH] Revert --- voice_recognition.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/voice_recognition.py b/voice_recognition.py index ac2eb73..84c65b1 100644 --- a/voice_recognition.py +++ b/voice_recognition.py @@ -141,17 +141,9 @@ class Transcriber(commands.Cog): @commands.hybrid_command(name="transcribe") async def test(self, ctx): logger.info("Attempt transcribe") - if self.bot.voice_clients: - voice_client = self.bot.voice_clients[0] - if not voice_client.is_connected(): - logger.info("Connecting to voice") - voice_client = await ctx.author.voice.channel.connect(cls=voice_recv.VoiceRecvClient) - voice_client.listen(self.wsink) - else: - voice_client = await ctx.author.voice.channel.connect(cls=voice_recv.VoiceRecvClient) - - voice_client.listen(self.wsink) + vc = await ctx.author.voice.channel.connect(cls=voice_recv.VoiceRecvClient) logger.info("Connected") + vc.listen(self.wsink) @commands.command(name="stop_transcribe") async def stop(self, ctx):