From 0024b0f8f0f9866de4f0c2936fe5c2ef9ec69d46 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 12 Oct 2019 19:39:36 +0200 Subject: [PATCH] change audio compression and fix typo --- commands/fun/vidshittifier.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/commands/fun/vidshittifier.js b/commands/fun/vidshittifier.js index 724d348a..b27a1dee 100644 --- a/commands/fun/vidshittifier.js +++ b/commands/fun/vidshittifier.js @@ -15,7 +15,7 @@ class vidshittifierCommand extends Command { type: 'string', }, { - id: 'compresion', + id: 'compression', type: 'integer' } ], @@ -37,15 +37,21 @@ class vidshittifierCommand extends Command { let input = `${os.tmpdir()}/${message.id}.mp4`; let output = `${os.tmpdir()}/Shittifyed${message.id}.mp4`; + let compression; - if (args.compresion == 1) { + let audioCompression; + + if (args.compression == 1) { compression = '50k'; - } else if (args.compresion == 2) { + audioCompression = '100k'; + } else if (args.compression == 2) { compression = '30k'; + audioCompression = '60k'; } else { compression = '10k'; + audioCompression = '20k'; } - let option = `-b:v ${compression} -b:a ${compression}`; + let option = `-b:v ${compression} -b:a ${audioCompression}`; let loadingmsg = await message.channel.send('Processing ');