Batch fix

This commit is contained in:
2024-11-10 17:00:29 +01:00
parent d53feec563
commit 73f184b263
+6 -4
View File
@@ -597,15 +597,17 @@ class MusicModule(commands.Cog):
self.logger.error("Not possible to connect to voice") self.logger.error("Not possible to connect to voice")
return return
self.logger.info("Connected to voice") self.logger.info("Connected to voice")
@commands.hybrid_command( @commands.hybrid_command(
name="batch_download", name="batch_download",
description="Zaciąga obiekty z pliku", description="Zaciąga obiekty z pliku",
guild=discord.Object(id=664789470779932693), guild=discord.Object(id=664789470779932693),
) )
async def batch_download(self,ctx, attachment): async def batch_download(self, ctx):
self.ctx.reply(attachment.content_type) self.logger.info(ctx.message.attachments[0].content_type)
contents = await attachment.read() file_bytes = ctx.message.attachments[0].read()
self.logger.info(contents) self.logger.info(file_bytes.decode(encoding="utf-8"))
async def disconnect(self, ctx): async def disconnect(self, ctx):
""" """
Asynchronous Python function that disconnects the voice client if it is connected and Asynchronous Python function that disconnects the voice client if it is connected and