change audio compression and fix typo

This commit is contained in:
loicbersier 2019-10-12 19:39:36 +02:00
parent 0e079683cb
commit 0024b0f8f0

View file

@ -15,7 +15,7 @@ class vidshittifierCommand extends Command {
type: 'string', type: 'string',
}, },
{ {
id: 'compresion', id: 'compression',
type: 'integer' type: 'integer'
} }
], ],
@ -37,15 +37,21 @@ class vidshittifierCommand extends Command {
let input = `${os.tmpdir()}/${message.id}.mp4`; let input = `${os.tmpdir()}/${message.id}.mp4`;
let output = `${os.tmpdir()}/Shittifyed${message.id}.mp4`; let output = `${os.tmpdir()}/Shittifyed${message.id}.mp4`;
let compression; let compression;
if (args.compresion == 1) { let audioCompression;
if (args.compression == 1) {
compression = '50k'; compression = '50k';
} else if (args.compresion == 2) { audioCompression = '100k';
} else if (args.compression == 2) {
compression = '30k'; compression = '30k';
audioCompression = '60k';
} else { } else {
compression = '10k'; 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 <a:loadingmin:527579785212329984>'); let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>');