Commit 8863fa60 authored by Loïc Bersier's avatar Loïc Bersier 😎
Browse files

Handle error

parent 57ad3910
......@@ -114,7 +114,11 @@ 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 {
retry++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment