add error message

This commit is contained in:
loicbersier 2020-02-27 16:20:30 +01:00
parent 96a7ec2325
commit 68bfd7ed17

View file

@ -56,7 +56,10 @@ 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}.wav`]})
.catch(() => {
return message.channel.send('End result is too big to fit on discord!');
});
})
.run();
})