Handle error
This commit is contained in:
parent
57ad39102f
commit
8863fa6050
1 changed files with 5 additions and 1 deletions
|
@ -114,7 +114,11 @@ class DownloadCommand extends Command {
|
||||||
message.channel.send({
|
message.channel.send({
|
||||||
embed: Embed,
|
embed: Embed,
|
||||||
files: [`${os.tmpdir()}/${message.id}compressed.mp4`]
|
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 {
|
} else {
|
||||||
retry++;
|
retry++;
|
||||||
|
|
Loading…
Reference in a new issue