changed the way it put fps

This commit is contained in:
loicbersier 2019-10-12 12:16:28 +02:00
parent 508b2783ca
commit e879848c05

View file

@ -51,13 +51,15 @@ class vid2giftCommand extends Command {
if (args.fps) { if (args.fps) {
options += ` -r ${args.fps}`; options += ` -r ${args.fps}`;
} else {
options += ' -r 15';
} }
fs.writeFile(`${os.tmpdir()}/${message.id}v2g`, buffer, () => { fs.writeFile(`${os.tmpdir()}/${message.id}v2g`, buffer, () => {
exec(`ffmpeg -i ${os.tmpdir()}/${message.id}v2g ${options} -r 15 ${os.tmpdir()}/${message.id}v2g.gif -hide_banner`) exec(`ffmpeg -i ${os.tmpdir()}/${message.id}v2g ${options} ${os.tmpdir()}/${message.id}v2g.gif -hide_banner`)
.then(() => { .then(() => {
return message.channel.send({files: [`${os.tmpdir()}/${message.id}v2g.gif`]}) return message.channel.send({files: [`${os.tmpdir()}/${message.id}v2g.gif`]})
.catch(err => { .catch(err => {