From 14ee901846f3bed32e8d1d6ed7b2f95be3d9775d Mon Sep 17 00:00:00 2001 From: supositware Date: Thu, 16 Jun 2022 14:36:38 +0200 Subject: [PATCH] Allow choosing multiple formats --- commands/download.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/download.js b/commands/download.js index c005198..3200aa1 100644 --- a/commands/download.js +++ b/commands/download.js @@ -61,6 +61,8 @@ module.exports = { new MessageSelectMenu() .setCustomId('downloadQuality') .setPlaceholder('Nothing selected') + .setMinValues(1) + .setMaxValues(2) .addOptions(options), ); @@ -89,6 +91,7 @@ async function download(url, interaction) { if (interaction.customId === 'downloadQuality') { format = interaction.values[0]; + if (interaction.values[1]) format += '+' + interaction.values[1]; } downloadVideo(url, interaction.id, format)