Handle error

This commit is contained in:
supositware 2021-03-04 13:34:49 +01:00
parent 57ad39102f
commit 8863fa6050

View file

@ -114,6 +114,10 @@ class DownloadCommand extends Command {
message.channel.send({
embed: Embed,
files: [`${os.tmpdir()}/${message.id}compressed.mp4`]
})
.catch(err => {
console.error(err);
return message.channel.send(`${err.name}: ${err.message} ${err.message === 'Request entity too large' ? 'The file size is too big' : ''}`);
});
});
} else {