mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 13:34:40 +00:00
work ongoing
This commit is contained in:
+13
-3
@@ -604,9 +604,19 @@ class MusicModule(commands.Cog):
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
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"))
|
||||
content_type = ctx.message.attachments[0].contluzent_type
|
||||
check = re.search ("text\/plain; *charset=(.*)", content_type, re.IGNORECASE)
|
||||
if check:
|
||||
file_bytes = await ctx.message.attachments[0].read()
|
||||
text = file_bytes.decode(encoding=check.group(1))
|
||||
self.logger.info(text)
|
||||
lines = text.split("\n")
|
||||
for item in lines:
|
||||
self.logger.info(item)
|
||||
|
||||
else:
|
||||
ctx.reply("Spierdalaj")
|
||||
|
||||
|
||||
async def disconnect(self, ctx):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user