add error message
This commit is contained in:
parent
96a7ec2325
commit
68bfd7ed17
1 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,10 @@ class image2audioCommand extends Command {
|
||||||
.on('end', () => {
|
.on('end', () => {
|
||||||
console.log('finished');
|
console.log('finished');
|
||||||
loadingmsg.delete();
|
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();
|
.run();
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue