From 06205aac950dd834d7dbad54b42f97a5f606613f Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 27 Feb 2020 18:21:11 +0100 Subject: [PATCH] use mp3 instead of wav --- commands/fun/image2audio.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/fun/image2audio.js b/commands/fun/image2audio.js index d7e4a30..2535657 100644 --- a/commands/fun/image2audio.js +++ b/commands/fun/image2audio.js @@ -54,7 +54,7 @@ class image2audioCommand extends Command { .audioChannels(1) .input(`${os.tmpdir()}/${message.id}1.png`) .inputFormat('s16le') - .output(`${os.tmpdir()}/i2a_${message.id}.wav`) + .output(`${os.tmpdir()}/i2a_${message.id}.mp3`) .on('error', (err, stdout, stderr) => { console.error(`${err}\n${stdout}\n${stderr}`); return message.channel.send('Uh oh, an error has occured!'); @@ -62,7 +62,7 @@ class image2audioCommand extends Command { .on('end', () => { console.log('finished'); loadingmsg.delete(); - return message.channel.send({files: [`${os.tmpdir()}/i2a_${message.id}.wav`]}) + return message.channel.send({files: [`${os.tmpdir()}/i2a_${message.id}.mp3`]}) .catch(() => { return message.channel.send('End result is too big to fit on discord!'); });