From 342d1e34a3fb039b6b47269df25422882edca78b Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 2 Oct 2025 12:54:18 +0200 Subject: added argument support for conversion.py --- cogs/conversion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cogs') diff --git a/cogs/conversion.py b/cogs/conversion.py index 4d5d4d9..deb7c80 100644 --- a/cogs/conversion.py +++ b/cogs/conversion.py @@ -35,7 +35,7 @@ class Conversion(commands.Cog): required=True, type=str ) - async def convert(self, ctx, plik, output_format): + async def convert(self, ctx, plik, output_format, args): await ctx.defer() # Save files to the temp directory inside the bot's root directory bot_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -52,9 +52,9 @@ class Conversion(commands.Cog): logger.info(f"Conversion started for: {file_type}") if file_type == "Video" or file_type == "Audio": # Execute ffmpeg command to compress video - ffmpeg_command = f"ffmpeg -i {input_path} {output_path}" + ffmpeg_command = f"ffmpeg -i {input_path} {args} {output_path}" elif file_type == "Image": - img_command = f"magick {input_path} {output_path}" + img_command = f"magick {input_path} {args} {output_path}" ffmpeg_command = img_command else: await ctx.respond("Plik jest nieobsługiwany", ephemeral=True) -- cgit v1.2.3