|
|
|
@ -126,10 +126,10 @@ export default {
|
|
|
|
|
const aproxFileSize = await utils.getVideoSize(url);
|
|
|
|
|
|
|
|
|
|
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) {
|
|
|
|
|
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);
|
|
|
|
@ -137,8 +137,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
async function download(url, interaction, originalInteraction) {
|
|
|
|
|
let format = 'bestvideo*+bestaudio/best';
|
|
|
|
|
|
|
|
|
|
let format = undefined;
|
|
|
|
|
const Embed = new EmbedBuilder()
|
|
|
|
|
.setColor(interaction.member ? interaction.member.displayHexColor : 'Navy')
|
|
|
|
|
.setAuthor({ name: `Downloaded by ${interaction.user.username}`, iconURL: interaction.user.displayAvatarURL(), url: url })
|
|
|
|
|