Return when the video is too big
This commit is contained in:
parent
3b9d2dc556
commit
e8fc57394f
1 changed files with 2 additions and 2 deletions
|
@ -126,10 +126,10 @@ export default {
|
||||||
const aproxFileSize = await utils.getVideoSize(url);
|
const aproxFileSize = await utils.getVideoSize(url);
|
||||||
|
|
||||||
if (aproxFileSize > 100 && !args.compress) {
|
if (aproxFileSize > 100 && !args.compress) {
|
||||||
await interaction.followUp('Uh oh! The video you tried to download is larger than 100 mb! Try again with compression.', { ephemeral: true });
|
return await interaction.followUp('Uh oh! The video you tried to download is larger than 100 mb! Try again with compression.', { ephemeral: true });
|
||||||
}
|
}
|
||||||
else if (aproxFileSize > 500) {
|
else if (aproxFileSize > 500) {
|
||||||
await interaction.followUp('Uh oh! The video you tried to download is larger than 500 mb!', { ephemeral: true });
|
return await interaction.followUp('Uh oh! The video you tried to download is larger than 500 mb!', { ephemeral: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
download(url, interaction);
|
download(url, interaction);
|
||||||
|
|
Loading…
Reference in a new issue