From 73f184b263dfab5f85e4ab754917bde3f3b10641 Mon Sep 17 00:00:00 2001 From: mtuszowski Date: Sun, 10 Nov 2024 17:00:29 +0100 Subject: [PATCH] Batch fix --- music_commands.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/music_commands.py b/music_commands.py index 7bdebe1..7083e4d 100644 --- a/music_commands.py +++ b/music_commands.py @@ -597,15 +597,17 @@ class MusicModule(commands.Cog): self.logger.error("Not possible to connect to voice") return self.logger.info("Connected to voice") + @commands.hybrid_command( name="batch_download", description="ZaciÄ…ga obiekty z pliku", guild=discord.Object(id=664789470779932693), ) - async def batch_download(self,ctx, attachment): - self.ctx.reply(attachment.content_type) - contents = await attachment.read() - self.logger.info(contents) + async def batch_download(self, ctx): + self.logger.info(ctx.message.attachments[0].content_type) + file_bytes = ctx.message.attachments[0].read() + self.logger.info(file_bytes.decode(encoding="utf-8")) + async def disconnect(self, ctx): """ Asynchronous Python function that disconnects the voice client if it is connected and