removed file upload due to incompatibility with discord

This commit is contained in:
2026-06-03 19:50:39 +05:30
parent 5dfb498908
commit 60645b1c68

View File

@@ -118,20 +118,10 @@ async def update_rss(ctx):
await ctx.respond("Sucessfully updated RSS feed") await ctx.respond("Sucessfully updated RSS feed")
@bot.slash_command() @bot.slash_command()
async def upload(ctx,file: discord.Attachment | None = None): async def upload(ctx):
messagechannel = bot.get_channel(torrent_link_channel_id) messagechannel = bot.get_channel(torrent_link_channel_id)
if file is None:
logger.info("No link attached")
else:
filename = file.filename
if ".torrent" in filename:
logger.info(f"{filename} recieved, uploading")
logger.info(file.title)
await file.save(filename)
await ctx.respond(f"{filename} recieved, uploading")
if ctx.user.id == fiery_eagle_id or ctx.user.id == dodi_id: if ctx.user.id == fiery_eagle_id or ctx.user.id == dodi_id:
files = files_to_upload(".") files = files_to_upload(".")
try: try: