use mp3 instead of wav

merge-requests/5/merge
loicbersier 4 years ago
parent 6f343cacdb
commit 06205aac95

@ -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!');
});

Loading…
Cancel
Save