Last łan for todej mejbi

This commit is contained in:
2024-09-20 17:53:48 +02:00
parent 71e5462617
commit e5d202ad3d
+8 -2
View File
@@ -129,12 +129,17 @@ class Transcriber(commands.Cog):
self.comm_queue = asyncio.Queue()
self.wsink = SRBuffer(self.comm_queue)
self.worker = None
self.mc = None
self.vc = None
@commands.hybrid_command(name="transcribe")
async def test(self, ctx):
logger.info("Attempt transcribe")
vc = None
if self.vc:
vc = self.vc #to juz powinien byc voice channel z funkcja conenct
else:
vc = None
self.mc = ctx.message.channel
if self.bot.voice_clients:
if isinstance(self.bot.voice_clients[0], voice_recv.VoiceRecvClient):
logger.info("Already transcribing")
@@ -218,6 +223,7 @@ class Transcriber(commands.Cog):
except Exception as e:
logger.warn("Exceptiom occured %s", e)
logger.info("Data sent")
await self.mc.send(("%s: %s", item.user, transcript.text))
if transcript.error:
logger.error(transcript.error)
raise AssertionError