use mp3 instead of wav
This commit is contained in:
parent
6f343cacdb
commit
06205aac95
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue