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")
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